JSON (JavaScript Object Notation) is a simple, lightweight and easy to read and write data exchange formats. In Java, normally we use Jackson or Gson to parse JSON.
1. Jackson
Tested with Jackson 2.9.8
- Jackson – How to parse JSON
- Jackson – Convert JSON string to Map
- Jackson – Convert JSON array string to List
- Jackson – How to ignore null fields
- Jackson – @JsonView examples
- Jackson – Tree Model examples
- Jackson – Streaming Model examples
- Jackson – How to enable pretty print JSON output
- Jackson – Convert Java Object to / from JSON
- @Deprecated Jackson 1.x – Convert Java Object to / from JSON
2. Gson
Tested with Gson 2.8.5
- Gson – How to parse JSON
- Gson – How to convert Java object to / from JSON
- Gson – Read and write JSON as a stream
- Gson – How to enable pretty print JSON output
3. FastJson
Tested with FastJson 1.2.57
- FastJson – Convert Java objects to / from JSON
FAQs
- JSON.simple – How to parse JSON
- @Deprecated JSON.simple 1.x – Read and write JSON
- JSONAssert – How to unit test JSON data
- Spring Test – How to test a JSON Array in jsonPath
- JavaScript Array to JSON