- string
- a number
- an object (JSON object)
- an array
- a boolean
- null
JSON values cannot be one of the following data types:
- a function
- a date
- undefined
JSON Strings
JSON strings must be written in double quotes.
JSON Numbers
JSON numbers must be an integer or a floating point.
JSON Objects
{
"student":{ "name":"Janusha", "age":19, "city":"Jaffna" }
}
JSON Arrays
{
"student":[ "Janusha", "Karunya", "Poomika" ]
}
JSON Booleans
JSON booleans can be true/false.
{ "sale":true }
JSON Null
{ "middlename":null }
No comments:
Post a Comment