一、net.sf.json
1.Json转Map
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
Map<String,Object> map = new HashMap<>();
map.put("code",jsonObject .getInt("code"));
2.Json转实体
JSONObject jsonObject = JSONObject.fromObject(jsonStr);
ArticleForm articleForm = (ArticleForm) JSONObject.toBean(jsonObject , ArticleForm.class);
如果实体中带有List字段,需要指定泛型
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put(<