Mapa mental
JSON Overview
Conteúdo do mapa
JSON Overview
What is it?
- Stands for JavaScript Object Notation.
- Lightweight data interchange format
- Self-describing and easy to understand for humans.
- Example
- “movie”: [ { “season”: “01”, “language”: “english”, “episode”: “second”, “director”: “Robert Anderson” } ]
- Has been used since 2001.
Data Interface
- Once JSON data is fetched from an API or local JSON file, HTML and even CSS can be used to display the data in a simple, readable table with rows and columns.
Data structures
- In JSON, data is represented in name/value pairs separated by a comma. The curly bracket contains the object and is separated from the name by a colon. Square brackets hold arrays, and a comma separates the array from values.
- Most data used in JSON ends up being encapsulated in a JSON object. Key-value pairs have a colon between them as in "key" : "value" . Each key-value pair is separated by a comma, so the middle of a JSON lists as follows: "key" : "value", "key" : "value", "key": "value"
Data specifications
- Name/value: A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value:
- eg. "firstName":"John"
- Objects: JSON objects are written inside curly braces and objects can contain multiple name/value pairs.
- eg. {"firstName":"John", "lastName":"Doe"}
- Arrays: an array can contain objects.
- eg. "employees":[ {"firstName":"John", "lastName":"Doe"}, {"firstName":"Anna", "lastName":"Smith"}, {"firstName":"Peter", "lastName":"Jones"} ]
- Constraints
- A value in JSON must be: a string, a number, an object, an array, a boolean, or null.
- String values must be written with double quotes.
- Numbers: Must be an integer or a floating point in JSON.
- e.g.{"age":50}
- Booleans: Values can be true/false in JSON.
- {"request":true}
- Null: Values can be null in JSON.
- {"phonenumber":null}
- Name/value: A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value:
Informações
- Descrição
- Mapa Mental sobre JSON Overview, criado por Isabella PATERNINA em 30-01-2025.
- Criado por
- Isabella PATERNINA
- Visualizações
- 1
- Avaliação