关于在controller中json数据与对象,map,list的相互转换
步骤:1.导入jackson相关jar包- jackson-annotations.jar- jackson-core.jar- jackson-databind.jar2.创建jackson的核心对象:ObjectMapperObjectMapper mapper = new ObjectMapper();3.调用mapper的相关方法对象转jsonUser user = ne...
原创
2019-08-21 14:36:27 ·
1728 阅读 ·
0 评论