fastjson(反)序列化使用总结

官方手册

JSON Fastjson最佳实践

多态对象的类型确定

JSONType_seeAlso

反序列化多层嵌套泛型类与java中的Type类型

https://www.cnblogs.com/liqipeng/p/9148545.html

保留value为null的字段, ref

  • 序列化Object -> JsonStr: String string = JSON.toJSONString(obj, SerializerFeature.WriteMapNullValue);
  • 反序列化JsonStr -> Object: Map<String,Object> map = JSONObject.parseObject(JsonStr,new TypeReference<Mao<String,Object>>(){})
原文地址:https://www.cnblogs.com/geekHao/p/13579894.html