The following code end up in an exception
'2019.10.5 14:16:14,1000' is not a valid date and time
when trying to parse the json to an object. The problem seems to be the decimal in the date.
JSonStr := '{"orderNumber": "395409772020_1", "modified": "2019-10-05T14:16:14.9995946Z"}';
Order := TJson.JsonToObject<TOrder>(JSonStr);
If I use a date with millisecond precision that rounds downwards i.e "modified": "2019-10-05T14:16:14.4995946Z"
it works fine.
I've tried adding options to set the format for the date. Order := TJson.JsonToObject<TOrder>(JSonStr, [joDateFormatParse]);
. This prevents the code from crashing, but the DateTime is not recognized and the value ends up with "0".
Anyway around this, or is it simply a bug in the library? I'm running Delphi 10.2 Update 3