In my web app, I'm serializing objects for storage using JSON.stringify() as described here. This is great, and I can easily re-create the objects from the JSON strings, but I lose all of the objects' methods. Is there a simple way to add these methods back to the objects that I'm overlooking - perhaps involving prototyping, something I'm not overly familiar with?
Or is it just a case of creating an elaborate function of my own for doing this?
Edit: Ideally, I'm looking for something like:
Object.inheritMethods(AnotherObject);
Object.create: developer.mozilla.org/en/JavaScript/Reference/Global_Objects/…