> From: Pyrolupus > > Mark Gibson wrote a lightweight jQuery plugin with $.toJSON() and > $.parseJSON(): > > http://jollytoad.googlepages.com/json.js > > I haven't tried it out, yet, but it looked good at a cursory glance.
Actually, Douglas "JSON" Crockford wrote the original code, so it's been well tested and proven: http://www.json.org/js.html Unfortunately, Doug's original code adds the toJSON and parseJSON to Object.prototype, which breaks jQuery and a lot of other code. Mark changed them into standalone functions (in the jQuery/$ namespace), making the code compatible with jQuery. (Thanks, Mark!) -Mike