11 points · by lelf · 11y ago · 22 comments
It's not actually used in pid 1, but in the userspace tooling.
I would however prefer if it used a lenient superset (allowing comments and trailing commas in lists, maybe also unquoted keys). Something like JSON5 ( http://json5.org/ ). The requirements for config files and for a wire-format are different (easily human-writable vs. strict standard).
Also, this is really, really something that would be better placed in a library. (If you don't want to avoid dynamic dependencies, then make it a source library or link staticly.)
Anyone know any other config file targeted formats? I'm not keen on YAML for config. There's libconfig (and assoc. format), but, imho, it's a bit complex
Why am I not surprised?
I give up.
The Only True Unix way is to invent an ad hoc configuration format with arbitrary rules about line breaks, tabulators and separator characters, incomplete Unicode support and confusing issues around whitespace escaping.
Of course being written in C, this implementation isn't likely to be able to handle arbitrary-precision numbers, but then neither do jansson nor json-c AFAIK.
a) separating configuration values from code
b) embedding an established interpreter