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")); }
你好世界!