Está en la página 1de 12

Algoritmia De Programación Del Software

SESIÓN 04: JSON / Try - Catch

Instructor:
German Leon Marin
www.senati.edu.pe
¿ QUE ES JSON ?

JavaScript Object Notation

Notacion de Objetos de JavaScript


www.senati.edu.pe
JAVASCRIPT OBJECT NOTATION

• Formato de representación e intercambio de datos

• Ligero, usado comúnmente para API, configuraciones o


almacenamiento de datos

• Fácil de leer/escribir para humanos, para las maquinas es


fácil interpretarlo y generarlo

• Se integra fácilmente con la mayoría de lenguajes


modernos
www.senati.edu.pe
TIPOS DE DATOS

Booleans Lógicos True false

Arrays [ valor ] [ “Senati”, “Instructor”, 100]

String “Texto” “Instructor Senati” “Senati” “”

Object {“clave”:valor, {“Edad”:35}


“clave”:valor} {“a”:1, “b”:2, “c”:3}
Number Numero 20 2.6 -15 1.5e10

Null Nulo null

www.senati.edu.pe
[ ] ARREGLOS

[
“Texto”,
100,
true,
false,
null,
{ }
]

www.senati.edu.pe
[ ] ARREGLOS

[
“Texto”, String
100,
true,
false,
null,
{ }
]

www.senati.edu.pe
[ ] ARREGLOS

[
“Texto”,
100, Number
true,
false,
null,
{ }
]

www.senati.edu.pe
[ ] ARREGLOS

[
“Texto”,
100,
true,
false, Boolean
null,
{ }
]

www.senati.edu.pe
[ ] ARREGLOS

[
“Texto”,
100,
true,
false,
null, Null
{ }
]

www.senati.edu.pe
[ ] ARREGLOS

[
“Texto”,
100,
true,
false,
null,
{ } Object
]

www.senati.edu.pe
{ } OBJETOS
• Contiene una o varios elementos
• Cada elemento se como de la combacion “clave”:valor
{
“nombre”: “German Leon Marin”,
“edad”: 35,
“direccion”: {
“calle”: “Mario Centore 7854”,
“ciudad”: “Tacna”
},
“trabaja”: true,
“hijos”: [ “Cielo”, “Piero” ]
}
www.senati.edu.pe
www.senati.edu.pe
www.senati.edu.pe

También podría gustarte