Recent content by jshepler

  1. J

    Alternative to JSON that CAN store JS functions and such?

    You can set the prototype of the deserialized object to your class to "re-attach" your functions. e.g.: function someClass(i) { this.someInt = i || 0; this.addOne = function() { this.someInt++; console.log(this.someInt); }; } var fromClass = new someClass(); var fromDB = {...