JSONArray 嵌套JSONArray 取值

JSON字符串

{"city":"shandong","country":{"name":"xxx","num":"xxx"}}
 for (int i = 0; i < jsonArray.size(); i++) { 
           JSONObject json = jsonArray.getJSONObject(i);
           System.out.println(json);
           String groupIdSupplier=UUID.randomUUID().toString().replaceAll("-", "");
           json.accumulate("id", groupIdSupplier);
           JSONArray blist = json.getJSONArray("country");  
       }

猜你喜欢

转载自blog.csdn.net/qq_38316726/article/details/78410208
今日推荐