Let's consider this illustrative example:
function Test() {
this.a = 3;
this.b = 4;
this.c = function(c, d) {
return c + d;
}
}
I would like to be able to convert this object into JSON and whenever needed to reload it along with the function(s) it has. JSON.stringify(new Test()) will ommit this.c.
Is it possible to do a smart save, saving the functions as well as the object and a smart load?