Following is an example for the JSON.
An example of JSON is very simple by using objects and arrays, where the JSON object will have information in the form of key and pairs.
[html]
{
"SPlessons":
{
"name": "Enni",
"ID": 513,
"Tutorial": "JAVA",
"Registered": true
}
}
[/html]
Keys and values are separated by a colon and keys are strings and values are the types of JSON, each information will be separated by a comma. The
"{"
indicates the JSON object. Following is the image to understand objects in the code.
Array symbol for JSON will be like
[]
. Following is an example by using array values.
[html]
["JANUARY", "FEBRUARY", "MARCH", "APRIL"]
[/html]
Following is an example of using array objects.
[html]
[
{"Name":"Enni", "email":"enni@gmail.com"},
{"Name":"IAS", "email":"ias@gmail.com"}
]
[/html]