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;

posted @ 2016-12-30 10:58  delphi中间件  阅读(2513)  评论(0编辑  收藏  举报