Below are some properties make JSON an ideal data-interchange language:
- JSON is “self-describing” and easy for humans to read and write.
- JSON represent values in form of key/value pairs.
- JSON is easy for API’s to parse and generate.
- JSON is a text format that is supported by many languages because of language-independent
Points to remember
The JSON file extension is “.json”
The JSON text MIME type is “application/json”.
Why use JSON?
There are so many reasons to use JSON:
- The JSON format is text, it can easily exchange browser to and from a server,
- JSON extensively used by NoSQL database to store records as JSON documents. For Ex: MongoDB, Oracle NoSQL Database, and Oracle Berkeley DB.
- Traditional relational databases constantly gaining more JSON capabilities like PostgreSQL, Oracle, etc. supports JSON data for certain features such as transactions, indexing, declarative querying, and views.
You can refer below JSON object to represent Student Detail. Corresponding is a description of the representation of each field in JSON with respect to the data type.
Above JSON is generated with respect to below Student JAVA object. You can follow below link to know about JSON supported Data Type and Syntax.
The same Student and JSON object will refer in the subsequent example related to JAVA for more JSON + JAVA handling example.
JAVA JSON API’s
Below is the list of the library that developed by java open source community to handle (JAVA +JSON) development.
Follow below link to know in-depth knowledge of JSON parsers and in which case should be used specifically.
You would like to see
Follow below link to learn more on JSON and JSON issues solutions: