JSON Tool Class Library: Alibaba/fastjson using record one, understanding JSON
JSON standard specification Chinese document: http://www.json.org/json-zh.html
Best Practice: http://kimmking.github.io/2017/06/06/json-best-practice/(advanced use of JSON, especially valuable for reference)
Ii. Project address and wiki:
Git address: Https://github.com/alibaba/fastjson
Wiki:https://github.com/alibaba/fastjson/wiki
faq:https://github.com/alibaba/fastjson/wiki/Frequently Asked Questions
Iii. main functions and advantages
There are three main classes of common use:
1. JSON: The methods of serialization and deserialization (parse () and tojsonstring ()) are in this class
Public Static FinalObject Parse (String text);//parse the JSON text to Jsonobject or Jsonarray Public Static FinalJsonobject parseobject (String text);//parse the JSON text into Jsonobject Public Static Final<T> T parseobject (String text, class<t> clazz);//parse the JSON text to JavaBean Public Static FinalJsonarray Parsearray (String text);//parse the JSON text into Jsonarray Public Static Final<T> list<t> Parsearray (String text, class<t> clazz);//parse the JSON text into a JavaBean collection Public Static FinalString tojsonstring (Object object);//serializing JavaBean to JSON text Public Static FinalString tojsonstring (Object object,BooleanPrettyformat);//serialize JavaBean to formatted JSON text Public Static FinalObject ToJSON (object javaobject); Convert JavaBean to Jsonobject or Jsonarray.
2. Jsonobject: This class is required when deserializing to an object, while providing an action method for the object
3. Jsonarray: This class is required when deserializing to an array of objects, while providing an action method for the object
the difference between Jsonobject and Jsonarray: understandable jsonobject is used for an object, Jsonarray for multiple objects.
Iv. References:
- Fastjson:http://www.cnblogs.com/zhenmingliu/archive/2011/12/29/2305775.html (Reference)
- Best Practice: http://kimmking.github.io/2017/06/06/json-best-practice/(high-level use of JSON, reference value)
- Fastjson Document Interpretation--Previous: http://blog.csdn.net/cqhzq2014/article/details/49512939 (mainly on the class and method of analysis, can refer to, the value is small, can see the source understanding)
- Fastjson document Interpretation--Next: http://blog.csdn.net/cqhzq2014/article/details/50117155 (mainly on the class and method of analysis, can refer to, the value is small, can see the source understanding)
JSON Tool class Library: Alibaba/fastjson usage record