相关资料:http://www.cnblogs.com/del/archive/2009/10/23/1588690.html
Delphi2007源代码:
1 procedure TForm1.Button1Click(Sender: TObject); 2 var 3 jo: ISuperObject; 4 item: ISuperObject; 5 begin 6 jo := SO(Memo1.Text); 7 for item in jo do 8 Showmessage(item.asjson(false,false)); 9 end;
Delphi7源代码:
1 //使用 TSuperObjectIter 遍历 2 procedure TForm1.Button8Click(Sender: TObject); 3 var 4 jo: ISuperObject; 5 item: TSuperObjectIter; 6 begin 7 jo := SO(Memo1.Text); 8 9 if ObjectFindFirst(jo, item) then 10 repeat 11 ShowMessageFmt(‘key: %s; val: %s‘, [item.key, item.val.AsString]); 12 until not ObjectFindNext(item); 13 ObjectFindClose(item); 14 end;
时间: 2024-10-20 05:29:06