In my web application, I serialize storage objects using JSON.stringify (), as described here . This is great, and I can easily recreate objects from JSON strings, but I lose all the methods of the objects. Is there an easy way to add these methods back to the objects I'm viewing - possibly using prototyping, which I'm not too familiar with?
Or is it just a case of creating my own complex function for this?
Edit: Ideally, I'm looking for something like:
Object.inheritMethods(AnotherObject);
source share