JavaScript and JSON Flashcards
1
Q
What is JSON?
A
JSON is a text-based data format following JavaScript object syntax, that closely resembles JavaScript object literal syntax.
2
Q
What are serialization and deserialization and why are they useful?
A
Serialization is the process of turning an object in memory into a stream of bytes so you can do stuff like store it on disk or send it over the network.
Deserialization is the reverse process: turning a stream of bytes into an object in memory.
3
Q
How to you serialize data into a JSON string using JavaScript?
A
JSON.stringify()
4
Q
How do you deserialize a JSON string using JavaScript?
A
JSON.parse()