Hacker News new | ask | show | jobs
by chubot 2674 days ago
Yeah I remember that quirk, and that's why I said it's "as much of a subset as it ever was". :) Because of this issue, it was technically never a subset.

But almost all real JSON documents are subsets of JavaScript, unless they happen to have those characters.

And the salient point is that if JSON never changes, then no further divergence from JavaScript is possible.

1 comments

But remember that your comment wasn't actually addressing avmich's objection to the assertion "All JSON is JavaScript, but not all JavaScript is JSON".

That assertion is indeed incorrect.

avmich then wrote "I thought they diverged specifications".

That is also correct. JSON was meant to be a perfect subset of JavaScript. Instead, and by accident, it diverged from the relevant specification.

Your comment instead was mostly focused on opposition to changing the existing JSON specification, which is a different topic.