0

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

0

3 Answers 3

7

Looks like you need to learn about MDN

https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify

Sign up to request clarification or add additional context in comments.

2 Comments

@Alnitak The OP did not ask for the exact specification. Plus reading that is sometimes impossible to know exactly what is going on. MDN does a great job making it work, plus normally offers pollyfills in the explanation. You do not get that with the spec.
He mentioned "standard objects". Those are defined in the specification, and plenty exist in MDN which are not "standard". Otherwise, yes, I also use MDN for most reference purposes.
2

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.

Comments

2

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.