JSON is a light-weight data interchange format that is easy for humans to read and write. It is easy for machines to parse and generate. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages (C, C++, JavaScript, and so on). These properties make JSON an ideal data-interchange language.

JSON is built on two structures:

a collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures.

In JSON, a name/value pair is represented as a member. A member is a name followed by a colon and a value. Members are separated by commas. The beginning of a JSON text is represented by { (left brace) and the end is represented by } (right brace). These are the only two structural characters in JSON. Names and strings are enclosed in double-quotes. Values can be one of the following data types:

a string
a number
an object (JSON object)
an array
a boolean

Strings are enclosed in double-quotes and can contain any Unicode character except for the Unicode character U+0000 (NULL) and U+0020 (space). Numbers can be any number format, including integers, floating-point numbers, and exponential numbers. An object is an unordered set of name/value pairs. An array is an ordered list of values. The ordering is significant in an array. A value can be a string, a number, an object, an array, a boolean, or null.

In addition, JSON supports the following two data types:

a string
a number

A string is a sequence of zero or more Unicode characters. Strings are enclosed in double-quotes. A string can contain any Unicode character except for the Unicode character U+0000 (NULL) and U+0020 (space).

A number is any floating-point or integer number format, including exponential numbers. Numbers are not enclosed in quotes.

Here is a simple example of a JSON text:

{“menu”: {
“id”: “file”,
“value”: “File”,
“popup”: {
“menuitem”: [
{“value”: “New”, “onclick”: “CreateNewDoc()”},
{“value”: “Open”, “onclick”: “OpenDoc()”},

Other related questions:

How JSON is used in REST API?

REST API is a web service that uses the REST (Representational State Transfer) architecture.

The REST architecture is based on the idea of resources, which are identified by unique URIs.

A client sends a request to a server, and the server responds with data in the form of JSON (JavaScript Object Notation).

What is REST JSON based API is REST?

REST is an architectural style for building web services
JSON is a data format that is often used in RESTful web services

So a REST JSON based API is an API that uses the REST architectural style and formats data using JSON.

What is JSON API Python?

JSON API Python is a library that allows you to encode and decode JSON data.


  • Was this Helpful ?
  • YesNo

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *