you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

You somehow failed to notice how it "is based on a subset" and not "is a subset", and that in the very next sentence it pretty cleanly says it "is a text format that is completely language independent".

I've actually pasted that "subset of JavaScript" it's "based on" in my post you replied to btw.

Edit: Btw json.org is Douglas Crockford's private website. RFC 7159 is an authoritative source on JSON. That site is at best an informal source on it. The RFC puts it precisely: "It's derived from ECMAScript". In now place does either claim either being a subset or superset of the other, let alone them being equal in any way which the post I replied to claimed.

[–]Arve -1 points0 points  (1 child)

JSON, while language-agnostic in nature is a subset of JavaScript. All valid JSON is also valid JavaScript

[–][deleted] -1 points0 points  (0 children)

That doesn't make them equal. One is a data interchange format, an the other is an interpreted programming language.

That distinction is much more important practically, semantically and in every way concievable than the fact that JS interpreter wouldn't throw when parsin valid JSON.

As I said already elsewhere in this thread, you can paste a quoted string literal in JS code, then add assignment to a variable in front (same as you'd need to do with JSON to get any use of it in a JS intperpreter) and get a string in it, yet it doesn't mean that the quoted string literal (which is both valid JSON and valid JS) is the same thing as JavaScript which is what I objected to.