JSON Flashcards
What is JSON?
Javascript object notation format for storing and transporting the data
What are serialization and deserialization?
Serialization attributes an object into a string, deserialization convert string in to object
How do you serialize a data structure into a JSON string using JavaScript?
JSON.stringify() convert a JavaScript object r-value into a json string
How do you deserialize a JSON string into a data structure using JavaScript?
JSON.parse()n
How to you store data in localStorage?
storage.setItem(key name, key value)
How to you retrieve data from localStorage?
storage.getItem(key name)
What data type can localStorage save in the browser?
string data
When does the ‘beforeunload’ event fire on the window object?
??????