JSON stringify missing from jQuery 1.4.1?

Geuis picture Geuis · Feb 17, 2010 · Viewed 64.7k times · Source

Apparently jQuery has the ability to decode a given object or string into a JSON object. However, I have a JS object that I need to POST back to the server and I find no utility in jQuery that wraps the JSON.stringify() function. That function is found in Chrome, Safari 4, FF3.6, and IE8 but is not found in earlier browsers. I can use it natively in the browsers that support it, but otherwise am forced to fall back to using Crockford's JSON scripts.

Is there some built-in with jQuery that handles JSON encoding and decoding that takes the place of the Crockford scripts?

Answer

shinkou picture shinkou · Feb 17, 2010

You might want to check this out: http://www.json.org/js.html