引用 JsonGYFunctions.pas
JSONObject :=TJsonObject.Parse(Memo1.Text) as TJsonObject;
//result是json中的一个数组
for j := 0 to JSONObject.A[‘result‘].Count-1 do
begin
JSONObject1 := JSONObject.A[‘result‘].O[j];
businessMode:=JSONObject1.S[‘businessMode‘];
weather获取的是result中的arrivalPlanList数组
weather := JSONObject1.A[‘arrivalPlanList‘];
for i := 0 to weather.Count - 1 do //应该是4条记录
begin
//得到weather的值
result := result + ‘|‘ +weather.O[i].S[‘instanceId‘];
end;
end;