Tag Archives: serialization

A JSON Serializer with Referential Integrity

Below is a JSON serializer implemented in JavaScript, along with an automated test of that serializer. When run, the program creates a complex test object, serializes it to a string in JSON format, deserializes that string back to an object, … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Deserializing and Reserializing XML in JavaScript

The JavaScript code below, when run, displays an XML-formatted text string, deserializes it into an an XMLDocument object, re-serializes that object into another text string, and then displays that text string. To see it in action, copy it into an … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Serializing and Deserializing Instances of Types in JavaScript

The code below builds a complex object that contains sub-objects as properties, serializes the object with all its children to JSON, deserializes that string to get back the original object, re-serializes that deserialized object, and then prints the two different … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Serializing and Deserializing Objects in JavaScript using JSON

The JavaScript code listed below declares a couple of “classes” (actually, functions) and then instantiates some nested instances of those classes. It then serializes the nested objects to a JSON string, displays that string, and then deserializes that string back … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Serialization of Objects in Java Using XStream

Serialization is the process of transforming complex objects into a format that can be easily sent over a network or written to persistent storage. Often this format is a text format, such as XML or JSON. Later, the original object … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment