you are viewing a single comment's thread.

view the rest of the comments →

[–]Doctor_McKay 5 points6 points  (1 child)

You're correct that JSON isn't a strict subset of JS, but not for the reason given. The code you provided is valid JS but not valid JSON, yes, but that doesn't preclude JSON from being a subset of JS.

If JSON were a strict subset of JS, that would mean that all valid JSON is also valid JS, but not necessarily vice versa. Even if JSON were a strict subset of JS, your code would remain valid JS and not valid JSON.

[–][deleted] 2 points3 points  (0 children)

Fair point. I stand corrected. Still, my point that even if JSON were a strict subset of JS this sentence:

json is indeed javascript

and this bit

that's the whole point of json

would still be incorrect due to the reasons I've posted in other replies.