124697
124697

Reputation: 21893

JSON.stringify() is this object and function standard to javascript?

I have never seen it before until today and it seems to just work without including any .js or framework. is this a standard object in javascript? if so where can I find the documentation for it and other uncommon Objects that are available in javascript

Upvotes: 0

Views: 142

Answers (3)

Spudley
Spudley

Reputation: 168755

Yes it is. It's a standard object, in common use and works in all current browser versions. Documentation here.

The only time you'll have a problem with it is in old IE versions; if you need to support them, you'll need to use a polyfill library like this one.

Upvotes: 2

Alnitak
Alnitak

Reputation: 339927

It's part of the ES5 specification. See http://es5.github.io/ for the whole annotated spec and for this function specifically see http://es5.github.io/#x15.12.3

See also http://caniuse.com/#search=json for a browser support matrix.

Upvotes: 2

Related Questions