引用 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;