What is the JSON code example
Example 1: what is JSON
JavaScript Object Notation
Its a key value pair
its popular light-weight way of transfering data
for example :
Lets try to create a json for Person Object
with name , age , isMarried , gender
Its ket value pair
the key is always String and need to be in quotation
value can be :
String
Number
Boolean
null
array
another json object
This is one json with 5 fields
each key value pair should be separated by comma
{
"name" : "Anna",
"age" : 18 ,
"isMarried" : false ,
"gender" : "female",
"company" : null
}
Example 2: JSON stands for
JSON = JavaScript Object Notation
Example 3: json full form
JSON stands for JavaScript Object Notation.
It is a lightweight format for storing and transporting data.
It is often used when data is sent from a server to a web page.
It is "self-describing" and easy to understand.