JavaScript Object Notation
JavaScript Object Notation (JSON) [ˈdʒɑː.və skrɪpt ˈɑːb.dʒɪkt noʊˈteɪ.ʃən]: a lightweight data format often used in data interchanging of web services and is native to JavaScript. Consists mainly of objects and arrays.
It is easy to read. But even though it is lightweight, there are other formats with are even lighter like CSV.
JSON knows the following data types:
JSON knows the following data types:
- object (in curly bracket), can have attributes
- array (in square bracket)
- null
- string
- integer
- float
- boolean
Example: A Person who is an architect. Has a spouse named Natalie, but no children and a 2010 Toyota hybrid car.
{ "person": { "spouse" : "Natalie" "children" : null, "job" : "Architect", "hobbies": ["swimming", "drawing", "cooking"], "car" : { "name" : "Toyota", "year" : "2010", "hybrid" : true } } }
[button url=”http://journocode.com/data-journalism-dictionary/” new_tab=”” button_style=”btn-info” button_size=”btn-default”] Back to Dictionary[/button]