Json
1. JSON Syntax Rules
JSON syntax is derived from JavaScript object notation syntax:
Data is in name/value pairs
Data is separated by commas
Curly braces hold objects
Square brackets hold arrays
The JSON format is almost identical to JavaScript objects.
In JSON, _keys _must be strings, written with double quotes:
In JavaScript, keys can be strings, numbers, or identifier names:
2. JSON values
in JSON, values must be one of the following data types:
a string
a number
an object(JSON object)
an array
a boolean
null
in JavaScript values can be all of the above, plus any other valid JavaScript expression, including:
a function
a date
undefined
3.Jackson(API) Jackson Library
Jackson is a high-performance JSON processor for Java. It provides many ways of working including simple POJO converted to/from JSON for simple cases. Jackson provides a set of annotations for mapping too.
Last updated
Was this helpful?