Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSON was designed as a wire format, not as a configuration file. The original idea was to validate it with a regex to exclude malicious input and then eval() it. That explain why it's such a small subset.

TOML on the other hand is also a clear indication that Tom did not like using (or hadn't learned about) a formal grammar.



JSON wasn't designed? It's just the literal notation from JS extracted, no?

And I don't thing you can validate JS with a regex? (Have I forgotten that much of formal language theory?)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: