Alex Rivera | Logout

Is JSON.parse supported by all major browsers?

Asked 2011-02-05T18:51:08.167
18

Possible Duplicate:
Browser-native JSON support (window.JSON)

Specifically, is JSON.parse(...) supported by IE7+, Firefox 2+, Chrome, Safari?

See: JSON in JavaScript

Edit
Report

1 Answer

1

I am afraid not. You can however use json2 script written by Douglas Crockford.

Here is what John Resig (creator of jQuery) has to say about it:

JSON2.js - Late last year Crockford quietly released a new version of his JSON API that replaced his existing API. The important difference was that it used a single base object (JSON) instead of extending all native object prototypes (booo!).

http://ejohn.org/blog/the-state-of-json/

You can download json2.js here :)

answered 2011-02-05T18:54:40.380

Your Answer