Home > Back-end >  Questions about the SuperObject json tool of Delphi
Questions about the SuperObject json tool of Delphi

Time:10-03

Previously used SuperObject will need a JSON string into data,
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 yourself

CodePudding user response:

TSuperObject. ParseString

CodePudding user response:

Var
Jo: 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.
  • Related