错误代码:
JSONObject jsonObject = JSONUtil.parseObj(production);
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("count",jsonObject.get("count"));
List
for (Production production1 : list) {
System.out.println(production1);
}
正确代码:
JSONObject jsonObject = JSONUtil.parseObj(production);
JSONArray list = jsonObject.getJSONArray("list");
List
for (Production production1 : productions) {
System.out.println(production1);
}