{
"TopNews": [{
"id": "5",
"title": "http:\/\/Test\/news_images\/title5",
"image": "http:\/\/Test\/news_images\/image5",
"description": "desc5",
"canComment": true
}, {
"id": "4",
"title": "http:\/\/Test\/news_images\/title4",
"image": "http:\/\/Test\/news_images\/image4",
"description": "desc4",
"canComment": true
}, {
"id": "3",
"title": "http:\/\/Test\/news_images\/title3",
"image": "http:\/\/Test\/news_images\/image3",
"description": "desc3",
"canComment": true
}, {
"id": "2",
"title": "http:\/\/Test\/news_images\/title2",
"image": "http:\/\/Test\/news_images\/image2",
"description": "description2",
"canComment": true
}, {
"id": "1",
"title": "http:\/\/Test\/news_images\/title1",
"image": "http:\/\/Test\/news_images\/image1",
"description": "desc1",
"canComment": true
}]
}
我想讀並顯示在我的應用程序是什麼「ID」 tag.please有人告訴我一個簡單的way.Any的幫助是非常appreciated.please傢伙。讀簡單的JSON在本地主機上的Android
http://www.androidcompetencycenter.com/2009/10/json-parsing-in-android/ – Anirudh
謝謝Anirudh.but有一個問題.JSON數據在我的本地machine.is這種方法適合localhost呢? ?? – bynu022
你能解釋一下嗎?你有一個Android應用程序正在讀取本地主機上的數據,這是你的機器或設備本身你是否已經將json存儲爲本地文件,或者是否正在向正在提供此數據的計算機(本地主機)發出http調用?無論哪種情況,解析都是一樣的。 – Anirudh