The timeless repository

JSON: The JavaScript subset that isn't

From Wikipedia’s article on JSON

JSON was based on a subset of the JavaScript scripting language.

All JSON-formatted text is also syntactically legal JavaScript code.

JSON is a subset of JavaScript.

All these years we’ve heard it over and over again: “JSON is a JavaScript subset”. Guess what? They’re wrong. Wrong, wrong, wrong. You see, the devil’s in the details, and there’s no way to avoid it: Not all JSON-formatted text is legal JavaScript code:

{"JSON":"ro
cks!"}

Continue to full post.


Subscribe to the feed What kind of blog is this really? Check out all the articles below ↓ Have a look at the recent changes


All articles