Java JSON Tutorial
来源:互联网 发布:qq飞车青峰剃刀数据 编辑:程序博客网 时间:2024/05/17 22:48
Java JSON Tutorial
JSON (JavaScript Object Notation), is a simple and easy to read and write data exchange format. It’s popular and implemented in countless projects worldwide, for those don’t like XML, JSON is a very good alternative solution.
In this series of Java JSON tutorials, we focus on three popular third party Java libraries to process JSON data, which areJackson, Google Gson and JSON.simple
Jackson
A High-performance JSON processor.
- Jackson data binding example – Object & JSON
Example to use ObjectMapper writeValue() and readValue() to convert Java object to / from JSON. - Jackson data binding example – Map & JSON
Example to convert Java Map to / from JSON - Jackson Tree Model example
Read JSON into Tree, like DOM for XML. - Jackson Streaming example
Example to use JsonGenerator() and JsonParser() to stream read and write JSON data. - Pretty print JSON output in Jackson
Pretty print JSON output via defaultPrettyPrintingWriter().
Google Gson
It was originally created for use inside Google, now it is used by many public projects.
- Gson data model example – Object & JSON
Example to use toJson() and fromJson() to convert Java Object to / from JSON. - Gson Streaming example
Example to use JsonWriter() and JsonReader () to stream read and write JSON data. - Pretty print JSON output in Gson
Pretty print JSON output via GsonBuilder.
JSON.simple
Simple Java library for JSON, to read and write JSON data.
- JSON.simple example – Read and write JSON
Example to show you how to read and write JSON data to / from file.
References
- Introducing JSON
- JSON described in RFC 4627
- JSON Wiki
- Jackson official website
- Gson official website
- JSON.simple official website
- Review of 5 Java JSON libraries
- Jackson vs Gson
- Java JSON Tutorial
- Java JSON Conversion Tutorial
- JSON in Android - Tutorial
- Android JSON Parsing Tutorial
- Android JSON Parsing Tutorial
- Android - JSON Parser Tutorial
- Java Tutorial
- Java Excel API Tutorial
- JSTL-java ee5 tutorial
- Java Applet Tutorial
- Download The Java Tutorial
- Java Web Services Tutorial
- Java JDBC Tutorial
- Java RMI Tutorial
- Java Tutorial 1
- Java Tutorial 2
- Java Tutorial 4 Encapsulation
- java game programming tutorial
- webservice编写和使用
- SUSE10安装memcached
- iOS(1): iOS7 隐藏Status Bar
- java帮助文档 JDK帮助文档(chm版) (所有版本提供下载)
- Java中Array与ArrayList的主要区别
- Java JSON Tutorial
- 平庸的程序员-个人履历
- HDU2145 zz's Mysterious Present 解题报告 ——最短路dijkstra算法
- HDU 1232 (简单并查集 查连通分支 13.10.30)
- const 如何实现
- MyBatis 3 – Spring integration tutorial
- 响应式的列布局
- 在VC6中添加svn插件
- linux命令使用记录