showing results for - "serialization and deserialization in javascript"
Teo
30 Jun 2018
1let simpleJSON ={ "name":"John", "age":30, "car":null };
2//serialization is converting an object to a string
3//...its useful when data is to be transmitted across a network
4let simpleString = JSON.stringify(simpleJSON);
5console.log(simpleString);
6
7//deserialization is converting a string to an object
8console.log(JSON.parse(simpleString));