Hacker News new | past | comments | ask | show | jobs | submit login

> it’s really hard to comment out a line in a JSON file, because you end up with an extra trailing , on the previous line

Every other language has figured this one out: just support trailing commas. JSON5 supports comments and trailing commas.

https://devblogs.microsoft.com/oldnewthing/20240209-00/?p=10... https://json5.org/

> The first version of CONL used # as a comment token, but I quickly ran into issues. URLs contain #, so my next version...

Every other language has figured this one out as well. Wrap strings in quotation marks.

> That led to a data-model where each value is one of scalar|list|map (Compared to JSON’s null|bool|number|string|object|array, this felt good).

I'm not sure what a "scalar" is in CONL (is it always a string?) but a config file format having fewer types than JSON does not feel good to me. Even JSON's hand-wavy "number" type is problematic (whether "1" is an integer or float or some some other type is implementation-defined). TOML got it right to distinguish integers from floats. TOML got this right.






> Wrap strings in quotation marks.

No one wants that in a config file




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: