-
ObjectMapper mapper = new ObjectMapper();
-
//对象转map
-
Map m = mapper.readValue(mapper.writeValueAsString(findArchiveDto), Map.class);
-
//map转对象
-
FindArchiveDto dto = mapper.readValue(mapper.writeValueAsString(m), FindArchiveDto.class);
jackson的转换object转map
发表评论