JSON (JavaScript Object Notation) is a data type that represent the information of objects.

JSON

JSON objects are composed of key value pair. Key must be a string; key and value is separated by using colons.

Below is an example about JSON object:

In this example, as you see, a JSON object is opened and closed using curly braces. We have fields, for example “name” = “Khanh” and each fields is separated by the comma.

JSON supports many different value types. The value type can be a String: “Khanh”, a number: 99, a boolean: true, an array like the value of key “group” or the object value of key “class”. These structures can be nested.

For more information about JSON, you can see at http://json.org/.

In this tutorial, Huong Dan Java will guide to you all some manipulation with JSON using some Java libraries.

Jackson Library

In this tutorial, I will show you all how to convert Java object to JSON using Jackson library.

In this tutorial, I will show you all how to convert JSON to Java object using Jackson library.

 

Add Comment