- Arrays allow trailing commas!
- Comments! (From a JSON perspective, that's huge!)
- Dates are UTC!
- Simple syntax, no semicolon / commas, no need to check for matching braces!
- No way to go back to the global hash. Once you go down one level, can't go back up!
inGlobal = true
[keygroup]
inKeyGroup = true
# Here, you can't add a key to the global hash!
-
You can't have mixed data in arrays unless they're both one level deep!
So, it feels like arrays are typed, except that empty arrays are not.
key = [ [1], ["foo"], [] ]
- You can't have hashes inside arrays!
# That really should be an array.
[dependancy1]
groupId = "com.google.api-client"
artifactId = "google-api-client"
version = "1.13.2-beta"
[dependancy2]
groupId = "com.google.api-client"
artifactId = "google-api-client-servlet"
version = "1.13.1-beta"
- The specification is lacking!
- A document in UTF-16 / Windows 1252 must change encoding to UTF-8 in each string!
- What happens when the keygroup is the empty string?
- Lots of (informally-specified) things you can't encode: keys with
=
in them, keygroups with]
in them… (The current spec allows=
in keys by not forbidding it.) Which special characters are allowed in keys anyway?
Alternative: the Settings File Format.
Ah, nice. I've heard good thing about Scala, but I keep my distance from the JVM if I can help it...
Eh? I think the wording is off here. That array is allowed now. But if my proposal is accepted, then it won't be allowed. (The problem is the use of the word "homogeneous." Arrays in TOML are homogeneous now and they will be if my proposal accepted. The wording is poor. The real change is how arrays are typed. Lots of people are getting confused by this.)
I've already done it for my parser. It took maybe an hour or two. And it was fun. :-)
Dang. That is unfortunate. I hope it is changed to UTF-8 only.
I'm not sure how smart mojombo is, but I suspect he left the spec imprecise for a reason. He wasn't trying to impose his idea of what the spec should be, but rather, lay fertile ground for plenty of other sources of input while providing some general principles for future development of the spec. At least, that's my opinion based purely on speculation (and it's what I would've done if I had his celebrity status).
Your format may be nicer, but alas, we plebians cannot release something and have the instant benefit of some level of adoption. And with a configuration file format, adoption is a big ingredient.