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.

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

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