Object 转对象 的问题
作者:互联网
在度娘上搜了好久大多数是用 :
方法1: ObjectMapper mapper = new ObjectMapper(); PageBean<MessageListVO> strPageBean = mapper.readValue(jsonString, PageBean.class); ObjectMapper objectMapper = new ObjectMapper(); EquipmentRepairDto appPlanEquipmepairDto = objectMapper.convertValue(busissInfo, EquipmentRepairDto.class); |
正确的转换方式为:
JSONObject jsonObject = (JSONObject) planFloessDTO.getBusssInfo(); |
标签:EquipmentRepairDto,对象,JSONObject,Object,问题,PageBean,class,ObjectMapper 来源: https://www.cnblogs.com/zxy-come-on/p/16379687.html