2015-09-30 20:02:33 +03:00
|
|
|
---
|
|
|
|
language: json
|
2015-09-30 20:06:35 +03:00
|
|
|
filename: learnjson-ro.json
|
2015-09-30 20:02:33 +03:00
|
|
|
contributors:
|
|
|
|
- ["Anna Harren", "https://github.com/iirelu"]
|
|
|
|
- ["Marco Scannadinari", "https://github.com/marcoms"]
|
2015-09-30 20:06:35 +03:00
|
|
|
translators:
|
|
|
|
- ["Serban Constantin", "https://github.com/fuzzmz"]
|
|
|
|
lang: ro-ro
|
2015-09-30 20:02:33 +03:00
|
|
|
---
|
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
Deoarece JSON este un fromat foarte simplu de schimb de date acesta va fi
|
|
|
|
probabil cel mai simplu Invata X in Y minute.
|
2015-09-30 20:02:33 +03:00
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
JSON in forma cea mai pura nu contine comentarii insa majoritatea parserelor
|
|
|
|
vor accepta comentarii in stil C (`//`, `/* */`). Pentru acest caz insa totul
|
|
|
|
va fi JSON 100% valid. Din fericire codul vorbeste de la sine.
|
2015-09-30 20:02:33 +03:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2015-09-30 20:19:11 +03:00
|
|
|
"cheie": "valoare",
|
2015-09-30 20:02:33 +03:00
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"chei": "trebuie mereu inconjurate de ghilimele",
|
|
|
|
"numere": 0,
|
|
|
|
"stringuri": "Bunã. Tot setul unicode este permis, chiar si \"escaping\".",
|
|
|
|
"are booleane?": true,
|
|
|
|
"nimic": null,
|
2015-09-30 20:02:33 +03:00
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"numere mari": 1.2e+100,
|
2015-09-30 20:02:33 +03:00
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"obiecte": {
|
|
|
|
"comentariu": "Majoritatea structurii va veni din obiecte.",
|
2015-09-30 20:02:33 +03:00
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"vectori": [0, 1, 2, 3, "Vectorii pot avea orice in ei.", 5],
|
2015-09-30 20:02:33 +03:00
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"alt obiect": {
|
|
|
|
"comentariu": "Lucrurile pot fi subordonate. Foarte util."
|
2015-09-30 20:02:33 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"glumite": [
|
2015-09-30 20:02:33 +03:00
|
|
|
{
|
2015-09-30 20:19:11 +03:00
|
|
|
"surse de potasiu": ["banane"]
|
2015-09-30 20:02:33 +03:00
|
|
|
},
|
|
|
|
[
|
|
|
|
[1, 0, 0, 0],
|
|
|
|
[0, 1, 0, 0],
|
|
|
|
[0, 0, 1, "neo"],
|
|
|
|
[0, 0, 0, 1]
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"stil alternativ": {
|
|
|
|
"comentariu": "ia uite la asta!"
|
|
|
|
, "pozitia virgulei": "nu conteaza - daca e inaintea valorii atunci e valida"
|
|
|
|
, "alt comentariu": "ce dragut"
|
2015-09-30 20:02:33 +03:00
|
|
|
},
|
|
|
|
|
2015-09-30 20:19:11 +03:00
|
|
|
"a fost scurt": "Am terminat. Acum stii tot ce are JSON de oferit."
|
2015-09-30 20:02:33 +03:00
|
|
|
}
|
|
|
|
```
|