How to serialize & deserialize JavaScript objects?
In general, there’s no way (in a browser) to serialize objects with functions attached to them: Every function has a reference to its outer scope, that scope won’t exist when you deserialize it, so serialized references to that scope will be invalid. What I would do is use the built-in (or json2.js) JSON.stringify and JSON.parse … Read more