JSON Flashcards
What is JSON?
string based data format following JavaScript’s object literal syntax for data interchange
What are serialization and deserialization?
Serialization - string format to convert into bytes, so that it can be transferred over a network or stored in a persistent storage
Deserialization - opposite of serialization, turning a stream of bytes into an object in memory
How to you serialize data into a JSON string using JavaScript
JSON.stringify
How do you deserialize a JSON string using JavaScript?
JSON.parse
Why are serialization and deserialization useful?
If want to send anything across networks or store something in a storage medium, wouldn’t be able to do that without serialization/deserialization