//Object转Map Stunent是实体
Map map = JSONObject.parseObject(JSONObject.toJSONString(Stunent), Map.class);
Map<String,Object> map = JSONObject.parseObject(JSON.toJSONString(Stunent));
先通过JSONObject.toJSONString将实体转换成json字符串,再通过JSONObject.parseObject转为map
//Map转Object
Stunent stunent= JSON.parseObject(JSON.toJSONString(map), Stunent.class);
Stunent stunent2 = JSONObject.toJavaObject(JSON.toJSONString(map), Stunent.class);
向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti