HY!
JSON:
{
"responseData":{
"countries":[
{
"name":"\u00d6sterreich",
"id":"1",
"channels":[
{
"name":"ARD",
"id":"3"
},
{
"name":"ORF 1",
"id":"1"
},
{
"name":"ORF 2",
"id":"2"
}
]
},
{
"name":"Deutschland",
"id":"2",
"channels":[
{
"name":"ARD",
"id":"3"
}
]
}
]
},
"responseDetails":null,
"responseStatus":200
}
Java代码:
JsonObject obj = new JSONParse(text);
JSONObject menuobj = this.getJSONObject("responseData");
如何使用国家/地区访问阵列?
THX
答案 0 :(得分:0)
这个怎么样:
JSONArray countries = menuObj.getJSONArray("countries");