fastjson教程

https://github.com/alibaba/fastjson/wiki/Quick-Start-CN

  • bean 2 fastjson:

JSONObject.parseObject(JSONObject.toJSON(bean).toString())
JSONObject.parseObject(JSONObject.toJSONString(bean))

  • fastjson 2 bean:

Depth depth = JSONObject.parseObject(depthJson.toJSONString(), Depth.class);

你可能感兴趣的:(fastjson教程)