我有一個JSON,如下所示:的Android - JSON解析
{
"places": [{
"name": "Ankola",
"slug": "ankola",
"category": "beach",
"distance": "521",
"travel_time": "8 hrs, 2 mins",
"days": "3",
"latitude": "14.669456",
"longitude": "74.300952",
"weather": "Summer 21\u00b0-36\u00b0C, Winter 12\u00b0-35\u00b0C",
"todo": "Baskal gudda, Nadibag, Shedikuli, Keni, Belekeri",
"about": "Ankola is a small town surrounded by numerous temples. It is in line with Arabian sea. Ankola is famous for its native breed of mango called ishaad and for cashews harvesting.",
"image": [
"Cm5NXlq.jpg",
"9OrlQ9C.jpg",
"DRWZakh.jpg",
"dFKVgXA.jpg",
"5WO2nDf.jpg"
]
}]
}
我知道如何獲取鍵 - 值對,但我不知道如何解析陣列內JSON以形成串陣列(圖像 - 在我的情況下)
總結我想這樣的事情: 我有5圖像名稱下的「圖像」標記,我想他們在一個字符串數組。我怎樣才能做到這一點?
JSONArray jsonArr = jsonObjet.getJSONArray( 「圖像」); – Martin 2013-02-14 10:06:26
希望錯誤的逗號是複製粘貼錯誤。另外,爲什麼圖像名稱本身在大括號中?你可以跟誰創建這個JSON? – 2013-02-14 10:06:41
它是有效的JSON? – rajeshwaran 2013-02-14 10:07:02