JSON tutorial in java - in detail with full programs



You are here : HomeCore Java Tutorials

JSON in Java - 

We will use Java API (JSR 353) for Processing JSON. This java Api provides portable APIs to parse, generate, transform, and query JSON using object model and streaming APIs.

What is JSON?
JSON stands for JavaScript Object Notation.

JSON is a lightweight, text-based, language-independent data exchange format that is easy for humans and machines to read and write. 

JSON can be used to represent following structured types >
  • Objects - An object is an unordered collection of zero or more name/value pairs 
  • Arrays - An array is an ordered sequence of zero or more values. 
The values can be of type strings, numbers, booleans, null.

Related links >

1. Jackson JSON - 

We can use Jackson api for for processing JSON in java.

Jackson JSON examples


2. Java provides API (JSR 353) for Processing JSON (JSR 353).
It provides -
  • Object Model API
  • Streaming API

Java API for JSON processing examples >

3. Simple (simple.JSONObject)


4. Google Gson - processing java json



5. TroubleShooting >


For new maven users - 


l
eEdit
Must read for you :