[
{
"name": "The Universe & The Earth"
, "imagename": "cat1.jpg"
, "active": "Y"
, "createdon": "1901-01-01"
, "lastmodifiedon": "1901-01-01 00:00:00"
, "description": "Knowledge of Earth location in the universe has been shaped by 400 years of telescopic observations, and has expanded radically in the last century.\n"
, "id": "1"
}
, {
"name": "Life on Earth"
, "imagename": "cat2.jpg"
, "active": "Y"
, "createdon": "1901-01-01"
, "lastmodifiedon": "1901-01-01 00:00:00"
, "description": "Over the last 3.7 billion years or so, living organisms on the Earth have diversified and adapted to almost every environment imaginable."
, "id": "2"
}
]
這是我的json值。現在我想解析並顯示在自定義列表視圖中,我如何可以 這樣做?我跟着http://www.androidhive.info/2012/01/android-json-parsing-tutorial/這是鏈接但不能實現。我怎樣才能做到這一點?有人可以告訴我嗎?提前致謝。如何在android中解析沒有json對象標題的json數組?
'JSONArray array = new JSONArray(theString);' – Blackbelt
是這個jsonArray,裏面有json對象嗎? –
是的。JsonArray裏面保存着JsonObjects。 –