[PATCH] add option for TJSONStreamer to process the properties in the declared order. Also use GetJSONInstanceType
Original Reporter info from Mantis: AndrewH @andrewd207
-
Reporter name:
Original Reporter info from Mantis: AndrewH @andrewd207
- Reporter name:
Description:
Hi this patch adds the ability for TJSONStreamer to process an object's properties in the order which they are declared. Also in TJSONStreamer.StreamProp use GetJSONInstanceType to create the JSON objects.
This also adds a default parameter to rttiutils TPropInfoList.Create to allow using the declared order. It defaults to the old behavior.
So:
TFoo = class
published
property ZFoo: String;
property ABar: String;
end;
Previously
{ "ABar": "value", "ZFoo", "value" }
Now with jsoUseDeclaredOrder in Options:
{ "ZFoo", "value", "ABar": "value" }
Mantis conversion info:
- Mantis ID: 36414
- Version: 3.3.1