日期:2014-05-16 浏览次数:20493 次
ObjectMapper m = new ObjectMapper(); String value = m.writeValueAsString(bean);
ObjectMapper m = new ObjectMapper(); TestPO test1 = m.readValue(json, TestPO.class);
objectMapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);//关闭时间戳输出,此时是ISO格式 objectMapper.setDateFormat(myDateFormat);//设置自己的格式