JSON Flashcards
1
Q
What is JSON?
A
(JavaScript Object Notation) - a standard string-based format for representing structured data (objects or arrays) based on JavaScript object syntax.
2
Q
What are serialization and deserialization?
A
- serialization: converting an object into a (json) string so it can be transmitted across the network
- deserialization: converting a (json) string to an object
3
Q
How do you serialize a data structure into a JSON string using JavaScript?
A
JSON.stringify( object/ value);
4
Q
How do you deserialize a JSON string into a data structure using JavaScript?
A
JSON.parse( the string);
5
Q
Why are serialization and deserialization useful?
A
makes it possible to send data