Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

serialization and deserialization in javascript

let simpleJSON ={ "name":"John", "age":30, "car":null };
//serialization is converting an object to a string
//...its useful when data is to be transmitted across a network
let simpleString = JSON.stringify(simpleJSON);
console.log(simpleString);

//deserialization is converting a string to an object
console.log(JSON.parse(simpleString));
 
PREVIOUS NEXT
Tagged: #serialization #deserialization #javascript
ADD COMMENT
Topic
Name
5+4 =