現在、アンドロイドプラットフォーム上のJSONで作業しています。誰も私にどのように複雑なJSONを読むために教えてください、任意の助けに感謝します。私はJSONレスポンス次JSONでHTTPレスポンスのネストされた配列の値を取得する方法
を取得しています
{
"query": {
"count":1,
"created":"2011-08-10T06:09:42Z",
"lang":"en-US",
"results": {
"channel":{
"item":{
"title":"Conditions for Las Vegas, NV at 7:53 pm PDT",
"lat":"36.17",
"long":"-115.14",
"link":"http://us.rd.yahoo.com/dailynews/rss/weather/Las_Vegas__NV/*http://weather.yahoo.com/forecast/USNV0049_f.html",
"pubDate":"Tue, 09 Aug 2011 7:53 pm PDT",
"condition":{
"code":"31",
"date":"Tue, 09 Aug 2011 7:53 pm PDT",
"temp":"97",
"text":"Clear"
},
"description":"\n<img src=\"http://l.yimg.com/a/i/us/we/52/31.gif\"/><br />\n<b>Current Conditions:</b><br />\nClear, 97 F<BR />\n<BR /><b>Forecast:</b><BR />\nTue - Clear. High: 106 Low: 77<br />\nWed - Sunny. High: 105 Low: 77<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Las_Vegas__NV/*http://weather.yahoo.com/forecast/USNV0049_f.html\">Full Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\" >The Weather Channel</a>)<br/>\n",
"forecast":[
{
"code":"31",
"date":"9 Aug 2011",
"day":"Tue",
"high":"106",
"low":"77",
"text":"Clear"
},{
"code":"32",
"date":"10 Aug 2011",
"day":"Wed",
"high":"105",
"low":"77",
"text":"Sunny"
}],
"guid":{
"isPermaLink":"false",
"content":"USNV0049_2011_08_09_19_53_PDT"
}
}
}
}
}
}
iがquery.results.chennel.item.title
またはquery.results.chennel.item,description
-elementを得るのですか教えてください?
質問はどこですか?私はその質問を見つけることができませんか?それはどこにある?私は質問を見つけるのを助ける!お願いします! – WarrenFaith
最初に、いくつかのコードを追加して、実際の問題がどこにあるのかを示してください。次に、AndroidドキュメントのJSONObjectとJSONArrayについて調べてみましょう – Houcine
ここにサンプル[example](http://www.kodejava.org/examples /587.html) – Hanry