0
我想以json的形式將數據從drupal網站發送到android應用程序。我已經創建了鏈接,現在我的鏈接正在以這種形式返回數據。 我不知道如何解析這個格式化的數據顯示在Android應用程序的列表視圖。如何解析從drupal站點到android應用程序的json數據?
{
"nodes" : [
{
"node" : {
"title" : "Saksham Iron Store",
"Contact" : "09216630565",
"Category" : "Decoration & Hardware",
"City" : "Sangrur"
}
},
{
"node" : {
"title" : "Loaffer Hut Garments",
"Contact" : "8591697698",
"Category" : "Fashion & Garments",
"City" : "Sangrur"
}
},
{
"node" : {
"title" : "BCB English Academy and Visa Guidance",
"Contact" : "8699010091",
"Category" : "Education",
"City" : "Sangrur"
}
},
{
"node" : {
"title" : "Aggarwal Engineering Corporation",
"Contact" : "9417070197",
"Category" : "Decoration & Hardware",
"City" : "Sangrur"
}
},
{
"node" : {
"title" : "Inder Sain Paint and Decoration",
"Contact" : "9888821904",
"Category" : "Decoration & Hardware",
"City" : "Sangrur"
}
}
]
}
我該如何解析它並在android應用程序的listview中顯示?
你的問題應該是「如何在Android中解析JSON?」 – Raptor 2015-02-11 10:03:18
[How to parse JSON in Android](http://stackoverflow.com/questions/9605913/how-to-parse-json-in-android) – Raptor 2015-02-11 10:03:37
格式不同 [ { 「 vehicleType「: 」挖掘機「, 」vehicleColor「: 」黃「, 」燃料「: 」柴油「, 」approvedOperators「: [ { 」名稱「: 」格雷格斯塔克「, 」experiencePoints「:13 },{ 「名」: 「阿爾蒂帕特爾」, 「experiencePoints」:21 },{ 「名稱」: 「塔裏克米贊」, 「experiencePoints」:9 } ], 「treadType」: 「板鏈」 }, 「treadType」: 「車輪」 } ] – 2015-02-11 10:19:43