test

博客园 首页 新随笔 联系 订阅 管理
        String json = "[{\"n\":\"北京\",\"i\":11,\"p\":0,\"y\":\"b\"},{\"n\":\"北京\",\"i\":1101,\"p\":11,\"y\":\"b\"}]";
        JSONArray jsonArray = JSONArray.parseArray(json);

        for (Object value : jsonArray) {
            JSONObject serverEntryObj = (JSONObject)  value;
            System.out.println(serverEntryObj.getString("n"));
        }

 

posted on 2022-11-11 14:50  testgogogo  阅读(18)  评论(0编辑  收藏  举报