by jameslk · 8y ago · 0 comments
I've been slowly ripping out YAML support and converting configurations to TOML.
Then there is floats without a leading zero. Missing colon after the key. And yea, naked keys. The need to wrap the entire file in { } or [ ] is just icing.
Honestly I feel the most bare simple conf format of [first-word] [rest-of-line] is enough for many programs that end up using but never taking advantage of more powerful formats.
JSON is often minified though - you're going to need something to use as a delimiter
Actually, I think you could leave out the delimiter altogether and still be syntactically unambiguous, since quotes are required around keys:
"key1":"value1""key2":2.75"key3":true"key4":"whatever"
though this looks terrible and there's probably some edge case I've forgotten. (Also it misses the point of JSON in that it's no longer valid JS. I don't know whether that's important anymore since you should be calling JSON.parse() not eval() anyway.)it's a shame json doesn't support them though. oh well. would be nice to restart the universe and get all this right next time. :-)