I dont know if there are fameworks that will do this for you but...
// Define class constructor
var SampleObject1 = function()
{
this.name = 'MySampleObject';
this.id = 1;
this.seed = 1.009;
this.createdAt = new Date();
this.obj = null;
};
// Create instance of serializer
var serializer = new Ant.Serializer();
// Register SampleObject1, so serializer gets to know how to deal with such objects
serializer.register('SampleObject1', SampleObject1);
// Create data that will be serialized
var object = new SampleObject1();
object.obj = new SampleObject1();
// Serialize and get string representation
var xml = serializer.save(object).toString();
// Displays (formatting is changed):
//
// MySampleObject
// 1
// 1.009
//
//
//
//
//
// MySampleObject
// 1
// 1.009
//
//
//
//
//
//
//
WScript.echo(xml);
// Displays: MySampleObject
WScript.echo(serializer.load(xml).name);