student对象:
StudentEntity studentEntity = JSON.parseObject(JSON.toJSONString(map.get("student")), StudentEntity.class);
map 转 JOSN----》JSONObject:
这里在进行打印的时候使用的是 Consumer 函数式接口,jdk>=8才有
Consumer consumer = System.out::println;
//map 转为 JSON 对象
Object o = JSON.toJSONString(map);
consumer.accept("------------------>>>>>>>>>>>" + o);
//转换为 JSONObject 对象,JSONObject是对 json 数据的一次 map 封装,可以像使用 map 一样进行使用
JSONObject jsonObject = JSON.parseObject(String.valueOf(o));