Re:TOML: Tom's Obvious Minimal Language
by wewxjfq on Sunday May 21, 2023 @08:47AM
(#36020355)
The problem with comments in configuration files is that they don't survive a `load -> native object -> save` round-trip.
[ Parent
| on HN ]
Comments lie, I think it would make sense to destroy them in load to native.
That sounds more like a problem with deserializing configuration instead of parsing.
Should a configuration language be a serialization language?
I'm unconvinced.
Augeas solves this for many config file formats: http://augeas.net/
I played around with "format preserving" edits of a few text formats, including nested formats (a JSON inside a TOML inside a YAML etc)