[ {
"question_id": 13,
"creation_date": 10,
"name": " certain degrees",
"tags": [
"android",
"sensor"
],
.....
...}
]
这是我要获取标签数组的api,标签数组仅包含索引和值,我想使用数组对象获取数组并最终存储在数组列表中,我尝试过但未能获取错误已发生。
02-20 15:45:37.323: I/System.out(1165): org.json.JSONException: Value android at 0 of type java.lang.String cannot be converted to JSONObject
谁能帮我解决这个问题。
tagarray = questionobj.getJSONArray("tags");
for(int j=0;j<tagarray.length();j++){
//tagobject = tagarray.getJSONObject(j);//..if i comment this line the full array list is displaying but i need for each question allocated tags to display..am i clear..
//if(tagobject!=null){
tagname.add(tagarray.getString(j));
///tagname.add(0, null);
//}
}