Mark-
-
Content Count
208 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Mark-
-
-
-
SWAG would be to capture the key in OnKeyDown test for the key if a VK_ADD, set the KeyDown(var Key: Word; to 0 and add the + to the edit field.
Same for the other -/etc. keys.
And you might need to turn on KeyPreview for the form.
- 1
-
Just now, aehimself said:Sorry about it, then. I really thought these methods are already in 10.2.
No problem. Looking at the 10.2 code, it just exits on error with the result as nil.
I wonder if I could/should write a console app in 10.4 and call it from the 10.2 created app.
-
1 hour ago, Mark- said:Thanks, it is not. I have 10.4 but use 10.2. I think I have 10.4 installed on a VM somewhere.
The 10.4 JSON parser uses some newer methods in other units and messing with that is not appealing.
- 1
-
7 minutes ago, aehimself said:What overloaded versions you have? Any with TJSONParseOptions will do.
There are only two options in TJSONParseOptions,
IsUTF8
UseBool
I found my 10.4 VM and will try to use the 10 JSON files with 10.2,
-
5 hours ago, Fr0sT.Brutal said:I suspect you'll have to modify some existing parser to achieve the goal. You can even write your own - JSON syntax isn't rocket science and you only need passthrough checker (no document structure).
Thanks
-
5 hours ago, aehimself said:I only have 10.4.2 so I don't know if this version is available on 10.2...
Thanks, it is not. I have 10.4 but use 10.2. I think I have 10.4 installed on a VM somewhere.
-
45 minutes ago, programmerdelphi2k said:TJSONObject.ParseJSONValue('JSON text', true, true);
There is not an overloaded version that accepts two boolean values in 10.2.
I do see the online help does list one for 11.2 I wonder which version it was added.
-
On 12/14/2022 at 12:57 PM, aehimself said:If you use System.JSON and parse with exceptions enabled, it'll tell you where an error is. However, it will only show the first error and not all, but at least it's a built-in option.
I found TJSONObject.ParseJSONValue and tried it. With invalid JSON text it just returns a nil result as expected, no exception is generated, with Delphi 10.2.
There are no exceptions set to ignore in "language exceptions" that are related to JSON.
Any ideas?
-
22 minutes ago, Fr0sT.Brutal said:JSON has no restrictions regarding lines,
Right, I should have said "block" or "terminator" based.
-
5 hours ago, Fr0sT.Brutal said:Okay how will you catch all errors here:
{
"foo": "bar,
quz deg
} when parser will stop after ","?
I thought testing would be line based, but what do I know. The one site I toyed with the most is https://jsononline.net/json-validator.
For the above example results:
"Error: Parse error on line 2: { "foo": "bar, quz deg} ---------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined' "
-
54 minutes ago, stijnsanders said:In case you're interested, I've written my own JSON parser: https://github.com/stijnsanders/jsonDoc/blob/master/jsonDoc.pas
Thanks I read the "README" and did not see how I could pass some JSON text and then get any errors reported. Did I miss something?
-
17 minutes ago, programmerdelphi2k said:JSONBuddy excellent tools offline!!!
Thanks
-
11 minutes ago, aehimself said:If you use System.JSON and parse with exceptions enabled, it'll tell you where an error is. However, it will only show the first error and not all, but at least it's a built-in option.
Thanks
-
Hello,
I know there are several online JSON validation sites and I am seeking one or both of below.
1. Delphi code or DLL that can validate JSON text.
2. A website I can POST the text to validate and get the results.
Any ideas?
Thanks,
Mark
-
Depends on when you create an instance of TFoo. Unless I am missing something.
-
1 hour ago, moalosi said:i want delphi 10.4 serial numbers
I want winning lottery numbers.
Next.
- 2
-
I switched to SSL.com years ago, for code signing certificates. Verification process was OK. Good prices.
-
1 hour ago, AlexBelo said:Any advice?
I would post on http://forum.madshi.net/. The creator normally answers without much delay.
-
Never used it so SWAG, two parameters?
-
1 hour ago, Uwe Raabe said:There is already TimeOf for that.
Yes, which is:
Result := Frac(AValue);
-
15 minutes ago, Uwe Raabe said:Probably because Now contains the date and the time, while EncodeTime uses an implicit date of 0.
I wondered that also. Time and Now put the same value in MyTime, according to the debugger inspector. I "thought" the compiler would remove the date porition of Now because MyTime is TTime not TDateTime.
But if I turn off the "Visualizer" in the watch properties and look at MyTime (Now) as a float it is 44689.4217036343.
And MyTime (Time) as a float it is 0.422856287...
So for me, use Time and for safety "Frac" the result of "dm.SettingBACKUPHOUR.AsDateTime;"
BackUpStart := Frac(dm.SettingBACKUPHOUR.AsDateTime);
-
If you set the time values, per the code I used, the "if" does work.
Which leads back to "BackUpStart := dm.SettingBACKUPHOUR.AsDateTime; // which is 20:30".
If you replace it with:
BackUpStart := EncodeTime(20,30,0,0); // which is 20:30
"if" does work. Right? Back to "BackUpStart := dm.SettingBACKUPHOUR.AsDateTime;".
Later;
I am wondering if the debugger inspector knows it is defined as TTime and truncates the date portion for display. Not sure that is possible.
If you change BackUpStart to TDateTime, does it display the same value in the debugger?
-
OK, so what is the problem?
Did you examine the value of "BackUpStart" in the debugger?
Digitally Sign Applicaiton
in General Help
Posted
SWAG, did you trying providing the full path to signtool.exe?