ahausladen / JsonDataObjects

JSON parser for Delphi 2009 and newer
MIT License
413 stars 160 forks source link

Add suport for DateTime vartype #13

Closed kattunga closed 8 years ago

kattunga commented 9 years ago

Added full support for JSON Dates, storing it internally as DateTime varType. I think I do not forgot anything. Automatically detect dates in parser is pending for future implementation.

Also added support for Extended dataType when casting from/to variants, because compiler don't know if convert it to double or TDateTime.

Please take a look at line 1504 and 1590. I have some doubt about whether it is correct.

Another doubt that I had is if I should use or not UseUtcTime = True in DateTimeToJSON when casting to string or executing toJSON. May be I should use global JsonSerializationConfig.UseUtcTime?

Regards Christian

kattunga commented 9 years ago

Added support to cast null to datatypes