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
Post a Comment