javascript-and-json Flashcards
What is JSON?
A text-based data format following JavaScript object syntax; useful when you want to transmit data across a network
What are serialization and deserialization?
Serialization is the process of turning an object in memory into a stream of bytes; deserialization is the reverse, turning a stream of bytes into an object in memory
Why are serialization and deserialization useful?
Serialization allows you to store data on a disk or sent it over the network; deserialization makes it so that data is easier to interact with
How do you serialize a data structure into a JSON string using JavaScript?
JSON.stringify() method
How do you deserialize a JSON string into a data structure using JavaScript?
JSON.parse() method