What is JSON?
JSON (JavaScript Object Notation) is an independent data exchange format.
JSON is a very condense data exchange format.
Android includes the json.org libraries which allow to work easily with JSON files.
In JSON a data structure is a key / value pair.
The key is a string, the value can be a numerical or boolean or an object.
Lists are one or more values surrounded by [] and separated by ",".
An object is a set of key / name pairs which starts with "{" and ends with "}".
Binary values are not supported.
JSON is a subset of the JavaScript Specification (ECME-Script) and is therefore directly in JavaScript.
An example JSON might look like the following.
{
firstName:'Lars',
lastName:'Vogel',
address: {
street:'Examplestr.',
number: '31'
}
}
No comments:
Post a Comment