Characteristics of JSON:: Readability: The JSON Is Very Easy To Read Since It Consist of
Characteristics of JSON:: Readability: The JSON Is Very Easy To Read Since It Consist of
JSON
The JSON syntax is very simple, similar to the normal text with some
keys and values. These keys are used to specify unique data in the
JSON.
Characteristics of JSON:
Size: The size of JSON data is very less, tons of JSON data
would add up to few MBs of data. It is a lightweight data, text-
based format.
the easy to send and retrieve data between server and client
rather than using complex structure to send data to server.
Application of JSON:
There are few uses of JSON in an application but, JSON plays the
important role such as:
Syntax:
{
"employees":[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName":"Jones"}
]
}
are two keys namely, “firstName” and “lastName”, mainly the above
syntax defines the information of the employee.
The data field inside JSON is similar to the javascript object. The data
field will consist of key/value pair. The syntax will be as follows: First
key name, followed by colon and then value of the key.
Key:value
For example:
“firstName”: “King”