JSON Flashcards

1
Q

What is JSON?

A

string based data format following JavaScript’s object literal syntax for data interchange

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are serialization and deserialization?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to you serialize data into a JSON string using JavaScript

A

JSON.stringify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you deserialize a JSON string using JavaScript?

A

JSON.parse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why are serialization and deserialization useful?

A

If want to send anything across networks or store something in a storage medium, wouldn’t be able to do that without serialization/deserialization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly