ObjectTransformer trans = ObjectTransformerFactory.getInstance()
.getImplementation();
// Serialize the Person object into a file.
FileOutputStream out = new FileOutputStream("fred.js");
trans.serializeToJson(fred, out);
out.close();
// Read a Person's JSON file and create a new Person object
// from its content.
FileInputStream in = new FileInputStream("fred.js");