org.json.JSONException: Value response of type java.lang.String cannot be converted to JSONArray
看起来响应是一个字符串而不是json数组
{ // json object node "response": { // json object response "result": 1, "Message": [ // json array Message { // json object node "pollid": "98", "category": "Entertainment", "question": "what", // string "option1": "981.mov",结果是一个json对象而不是json数组
JSonArray jsonArray = new JSonArray(result);
应该
JSonObject jObj = new JSonObject(result);JSonObject response = jObj.getJSonObject("response");//JSonObject jb = new JSonObject(response);JSonArray jr = response.getJSonArray("Message");for(int i=0;i<jr.length();i++){JSonObject jb1 = jr.getJSonObject(i);String question = jb1.getString("question");Log.i(".......",question);}


