JSON is a subset of the JavaScript Specification (ECME-Script) and it is therefore directly supported in JavaScript.
Data structures in JSON are based on key / value pairs. The key is a string, the value can be a numerical value, a boolean value (true or false) or an object.
An JSON object is a set of key / value pairs which starts with "{" and ends with "}".
{
firstName:'Lars',
lastName:'Vogel',
address: {
street:'Examplestr.',
number: '31'
}
}
Lists are one or more values surrounded by [] and separated by ",".
[
{
firstName:'Lars',
lastName:'Vogel',
address: {
street:'Examplestr.',
number: '31'
}
}
,
{
firstName:'Jack',
lastName:'Hack',
address: {
street:'Examplestr.',
number: '31'
}
}
]