logoalt Hacker News

Sankozi12/09/20241 replyview on HN

If it was really designed for representing JS objects then it was really bad job.

Neither JSON supports JS objects (lack of NaN) nor JS supports JSON (lack of arbitrary precision decimals).


Replies

DrScientist12/09/2024

Fair enough - perhaps I should have said it was inspired by Javascript literal syntax and simplified to make it a platform independent data exchange format and not a application configuration format. Though I can see how the latter is tempting if your application is in JS.