Map<String, Date> map = new HashMap<String, Date>(); map.put("now", new Date()); String str = JSON.toJSONString(map,SerializerFeature.WriteClassName); System.out.println(str); Map<String, Date> result = JSON.parseObject(str, map.getClass()); System.out.println(result.get("now").getClass());
FASTJSON 增加对泛型的支持
FASTJSON 默认没有开启对泛型的支持。通过SerializerFeature.WriteClassName增加
猜你喜欢
转载自san-yun.iteye.com/blog/2424013
今日推荐
周排行