Java Some Utils
1、map2Java
利用fastJson工具
Map<String,Object> map=new HashMap<>();
map.put("key1","obj1");
map.put("key2","obj2");
//先将map转为String字符串
String s = JSON.toJSONString(map);
//再将String转为Student 类
Student student = JSON.parseObject(s, Student .class);
Map parseObject = JSON.parseObject(JSON.toJSONString(Student), Map.class);
System.out.println(parseObject);