javascript - What is the JSON global object? -


i'm reading best way parse json in browser using json.parse() method.

sorry, i've been living under rock — hell did json global object come from? defined in standard? available in browsers? when should use crockford's json2.js instead?

it part of ecmascript 5, , object internal class json holds relevant methods (stringify , parse) processing json data.

use json2 library in browsers json not implemented.

you test this:

if( object.prototype.tostring.call( window.json ) !== '[object json]' ) {     // load library } 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -