delphi json文件解析


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM