←back to thread

Fixing JSON

(www.tbray.org)
139 points robin_reala | 1 comments | | HN request time: 0.5s | source
Show context
_greim_ ◴[] No.12327784[source]
With the exception of trailing commas, all these things would break the fact that JSON is a subset of JavaScript. Breaking that would cause a lot more problems than it solves. It's just that the minor problems you have to live with seem worse than the major problems you don't.
replies(1): >>12327801 #
wtetzner ◴[] No.12327801[source]
What value is there in having JSON be a subset of JavaScript? In fact, it would be a good idea to make it not be a subset of JS, because that would prevent people from evaling it.
replies(6): >>12327847 #>>12327856 #>>12327894 #>>12327900 #>>12327926 #>>12328431 #
_greim_ ◴[] No.12328431[source]
> What value is there in having JSON be a subset of JavaScript?

* Virtually zero learning curve if you already know JS.

* It can be pasted into and out of a working program.

* Constrains the format from becoming bloated.

replies(1): >>12329757 #
1. rat87 ◴[] No.12329757[source]
> Virtually zero learning curve if you already know JS.

What if you know other languages but not js?

> * It can be pasted into and out of a working program.

Again only true for js