Serialization is to make an object persistent across session. An object exists in memory of a program instance (e.g. Javascript). Once the program terminated, memory is released and the object ceases to exist. To preserve am object across different program instances, the object must be stored in an persistent media (disk). The object memory layout is converted to string and kept on disk.
JSON2 library contains routine to serialize a JavaScript object (stringify) and to recreate the object in memory from a serialize object (parse).
No comments:
Post a Comment