赞
踩
{"Array":[ {"1":"1_1","1_2_1":"1_2_2"}, {"x":"x_x","x_y_x":"x_y_y"} ]}
program Project3;
uses
SysUtils, dbxjson;
var jsobj, jso : TJsonObject;
jsa : TJsonArray;
jsp : TJsonPair;
begin
try
//create top-level object
jsObj := TJsonObject.Create();
//create an json-array
jsa := TJsonArray.Create();
//add array to object
jsp := TJSONPair.Create('Array', jsa);
jsObj.AddPair(jsp);
//add items to the _first_ elemet of array
jso := TJsonObject.Create();
//add object pairs
jso.AddPair(TJsonPair.Create('1', '1_1'));
jso
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。