解决方案 »

  1.   

    location和detail_info和上边的一样的解析 ,你都能解析一部分了 ,我想剩下的也能解析。
      

  2.   


     String location = json_location.getString("location");
      String details = json_details.getString("detail_info");
    JSONObject location =JSONObject.fromObject(location );
    JSONObject details =JSONObject.fromObject(details );
    details .getString("environment_rating");要说取啥就行了 。JSONObject  就是 json字符串和javaBean的中间对象 ,
      

  3.   

    你要是不json 转成java对象 就得这么转, 你应该是哪里写的不对 。
      

  4.   

       public static void main(String[] args) throws IOException {
            JSONArray jsonArray = searchLocation("芜湖");
            Iterator iteratorArray = jsonArray.iterator();
            while (iteratorArray.hasNext()) {
                JSONObject json = (JSONObject) iteratorArray.next();
                String results = json.getString("results");
                JSONArray resultArray = JSONArray.fromObject(results);
                Iterator iteratorResult = resultArray.iterator();
                while (iteratorResult.hasNext()) {
                    JSONObject iteratorJson = (JSONObject) iteratorResult.next();
                    System.out.println(iteratorJson.getString("name"));
                    System.out.println(iteratorJson.getString("address"));
                    System.out.println(iteratorJson.getString("telephone"));
                    System.out.println(iteratorJson.getString("uid"));
                   
                    String location = iteratorJson.getString("location");
                    String details = iteratorJson.getString("detail_info");
    JSONObject location =JSONObject.fromObject(location );
    JSONObject details =JSONObject.fromObject(details );
    System.out.println(details .getString("environment_rating"));

                }
            }
        }
      

  5.   

    map里有map   该怎么遍历就怎么遍历