Hacker News new | ask | show | jobs
by andrewingram 2364 days ago
I've been recommended this library rather than figuring it for myself:

https://github.com/yahoo/serialize-javascript

You can use it in JSON mode like this: `serialize(obj, {isJSON: true});`