Ask HN: Why is JSON so pedantic?

https://news.ycombinator.com/item?id=30558583
by thyrox • 4 years ago
5 8 4 years ago

Why can't we have a trailing comma in JSON? Why doesn't it support inline comments. Why can't we single quote things? Why do we need to double quote keys?

JavaScript objects are similar to JSON and allow all this and it works just fine. They never misinterpret anything.

So why can't JSON be more forgiving? I remember XML used to be the same back in the day.

Why do creators of schema make them so strict? Isn't the whole thing about making life of users (or devs in the case) easier? What purpose does such fussy specifications achieve?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com