tipos de datos permitidos en un JSON

string, number, object (JSON object), array, boolean, null

Métodos de conversión javascript / typescript

JSON.stringify(myObj);
JSON.parse(myJSON);

//avanzado
var obj = JSON.parse(text, function (key, value) {
if (key == “birth”) {
return newDate(value);
} else {
return value;
}});

MIME type

application/json

Looping

//object
for (var x in myObj)
if(myObj.hasOwnProperty(x)
myObj[x];

//array
for (var i in myArray)
myArray[i];

for (var i = 0; i < myArray.length; i++) { myArray[i]; }