Have just downloaded Delphi 12.1 and tried out JSON Data Binding Wizard for the first time. Amongst other options it offers
JSON mapping library: JSON marshaling/serialization library, for which the Delphi types must be generated. Options are:
System.JSON.Serializers (using TJsonSerializer.Serialize<T> and TJsonSerializer.Deserialize<T>)
REST.Json (using TJson.JsonToObject<T> and TJson.ObjectToJsonString)
I have tried generating code using a couple of JSON examples, and from what I can tell the differences between the two libraries are:
- System.JSON.Serializers supports records and JSON arrays as TObjectList
- REST.Json only supports JSON arrays as TArray
Cannot find any more information about the two libraries and Delphi help often just says: Embarcadero Technologies does not currently have any additional information.
Has anybody used both approaches and can offer other reasons to pick one over the other ?