Major release
Bugfixes
- GenericListReflect attribute could raise an AV
- The DTO could leak memory if you didn't ask for all lists
- A floating point number inside a string was recognized as a Boolean
- The JSONName annotation wasn't always applied when needed
- JSON Keys starting with a number didn't generate valid code
- The internal Array was marshalled when converting the DTO to JSON
New Features
- Support for Empty Anonymous Array
[ ]
- Support for array with simple types (non object)
{
"property":[
"Test 1",
"Test 2"
]
}
- Array merging. When the objects of an Array contains different properties, this is merges into one object structure:
JSON:
[
{
"S1":"5102"
},
{
"S1":"5102",
"S2":"True"
}
]
DTO
TItemsDTO = class
private
FS1: string;
FS2: Boolean;
published
property S1: string read FS1 write FS1;
property S2: Boolean read FS2 write FS2;
end;
- Date and time, with optional fractional seconds and time zone (e.g., 2008-08-30T01:45:36 or 2008-08-30T01:45:36.123Z) are detected.
- Added a lot of Demo data
- The program can now generate a demo project using your JSON
- More Reserved Words are recognized
- Better naming of Delphi properties eg. firstrname becomes FirstName, was Firstname
The Code
- Heavy core-restructure in order to make the classes more loosely bind
- GetJsonType has been isolated in order for it to be unit tested
- TJSONName.CapitalizeFirst has been made public in order for it to be unit tested
- Added unit test og central part of the code. More to come
- Added End 2 End test for all demo data files