Has anyone implemented Mozilla\'s Object.toSource() method for Internet Explorer and other non-Gecko browsers? I\'m looking for a lightweight way to serialize simple object
If you need to serialise objects with circular references you can use the cycle.js extension to the JSON object by Douglas Crockford available at https://github.com/douglascrockford/JSON-js. This works very like toSource(), although it won't serialise functions (but could probably be adapted to using a function's toString method).