14
The JSON file format uses two types of symbols to organize the data in its structure, they are:
- Square brackets:
[ ]
- Keys:
{ }
In them it is possible to insert values of several types, see this illustration example:
{
"Nome": "Ana",
"Endereco": [
{"Rua": "Rua da boiada"},
{"Cidade": "Cruzeiro"}
],
"Telefones": ["31991188", "39999100"]
}
My doubts are linked to these symbols mentioned above.
Doubts
I would like to know what are the differences between brackets [ ]
and keys { }
and what the appropriate situations would be for each of them?
{}
is to create objects and[]
to create arrays.– RFL