mormot json操作

使用JSon只需要引用一个文件synCommons。

procedure TForm1.Button1Click(Sender: TObject);
var jo: Variant; i: Int64;
begin
TDocVariant.New(jo); ;
i := 0;
while i < 10 do begin
jo.Name := 'This is a Str' + IntToStr(i);
jo.Age := i;
jo.List:=_JSon('[1,"Hello",5,{"name":"c5soft","age":50}]');
Memo1.Lines.Add(VariantSaveJSON(jo));
inc(i);
end;
end;

原文地址:https://www.cnblogs.com/hnxxcxg/p/6236025.html