Only through SuperObject object, parse the JSON string objects in one by one,
Excuse me, can directly through the SuperObject the entire JSON string data objects directly to need, without a field analytical,
. Like the.net Newtonsoft in Json as a Json string deserialized into directly, their definition of the object
CodePudding user response:
Seem to do not have this function, write yourselfCodePudding user response:
TSuperObject. ParseStringCodePudding user response:
VarJo: ISuperObject;
Ja: TSuperArray;
The begin
Jo: SO=(JsonStr);
//grouped by Row
Ja: Jo=[' ClassName '] AsArray;
For I:=0 to ja. Do Length - 1
The begin
ShowMessage (ja [I] [r]. "FieldName" AsString) are identical.
end;
end;
JsonStr structure is as follows:
{" ClassName ": [{" FieldName" : "FieldValue", "FieldName1" : "FieldValue1"}, {" FieldName ":" FieldValue ", "FieldName1" : "FieldValue1}]}.
Don't know whether to this, this outside an entity class also makes no difference!
CodePudding user response:
Seems no, only one assignment.