logoalt Hacker News

yosito12/09/20243 repliesview on HN

Except that JSON is a valid JavaScript object, and JSON5 is not.


Replies

Zamicol12/09/2024

Why is it not? My understanding is that it is a valid ES5 and forward object.

ahartmetz12/09/2024

Unless there's a direct lie in the description of JSON5 ("subset of ECMAScript"), JSON5 objects are valid JS objects.

tubthumper812/09/2024

Can you provide an example?