// An array of people
var a=[
{name:"Peter",age:40},
{name:"Mary",age:20}
];
// Peter gets his own method
a[0].getOlder=function(){this.age++};
// And we extend the Object.prototype just for fun
Object.prototype.extra=1;
// Mary is Peter's child
a[0].child=a[1];
// Which logically means Peter is Mary's parent
a[1].parent=a[0];
// Flags that affects the stringifier
// (default:false,false,false,true,true)
JSONstring.compactOutput=false;
JSONstring.includeProtos=false;
JSONstring.includeFunctions=false;
JSONstring.detectCirculars=true;
JSONstring.restoreCirculars=true;
// Now let us stringify this
var s=JSONstring.make(a);
/**/
// And check how converting the string back to an object works
var b=JSONstring.toObject(s);
var bTest=b[1]+", "+b[1].name;
if(b[1].parent){bTest+=", "+b[1].parent.name};
/**/