Uploaded by ravendrans

jason

advertisement
{
"first_name" : "Sammy",
"last_name" : "Shark",
"location" : "Ocean",
"online" : true,
"followers" : 987
JSON Objects
JSON objects are wrapped in curly braces. Inside the
object, we can list any number of key-value pairs,
separated by commas:
}
JSON array,
[
{ "name": "Jason", "gender": "M", "age": 27 },
there are three objects.
{ "name": "Rosita", "gender": "F", "age": 23 },
{ "name": "Leo", "gender": "M", "age": 19 }
]
Format { “ ”: “ ” }
Each object is a record of a person (with name,
gender, and age).
Keys must be strings, and values must be
a valid
JSON
data
type (string,
number, object, array, boolean or null
Example {“position”: “winner”,”country”:
“U.S.A”}
JSON values are found to the right of the colon.
At the granular level, these need to be one of
{ "first_name" : "Sammy", "last_name": "Shark",
"online" : true, }






following six data types:
strings
numbers
objects
arrays
Booleans (true or false)
null
Download