3 ms·
Agreed. JSON is the new XML. This isn't to say that I would prefer JSON over XML - I most definitely wouldn't - but it is just as abused lately. I hope we will
by tie_ 10y ago
Agreed. JSON is the new XML.
This isn't to say that I would prefer JSON over XML - I most definitely wouldn't - but it is just as abused lately. I hope we will see its demise soon and something coming out of the YAML line (e.g. TOML) getting more widespread.
- nojvek 10y agoTOML? First time I'm hearing of it
- dozzie 10y agoSmall, INI-like language for specifying configuration.
- RangerScience 10y agoTOML looks like slightly more complicated YAML (just because there are more sigils in a few places). I only skimmed the Github readme, what makes TOML better than YAML?
- espadrine 10y agoSimplicity. That's at the expense of a few things, however. For instance, array can't contain objects of different types; even [ 1, 2.0 ] is not allowed. Also, having a map (aka. a dictionary) in an array is really awkward to write, and there probably are cases that simply can't be expressed. It has first-class dates, though. I wrote about the state of settings formats around the time that TOML was born: <http://espadrine.tumblr.com/post/44576550326/a-history-of-settings-file-format-and-dotset> http://espadrine.tumblr.com/post/44576550326/a-history-of-se....
- tie_ 10y agoThanks for the great article! It echoes most of my thoughts. And thanks for Dotset - didn't know it exists, but it looks very, very neat. In most but the most basic configurations, however, I found myself missing some of variables, inheritance, dates. TOML solves the last two, but as you point out it has limitations. YAML solves the first two, though in a bit of an ugly and obscure way. No wonder Salt and Ansible, two heavy users of YAML configs both pass it through templating engines to reach their goals. For the lack of better alternatives, I usually end up with a Django-style Python module holding the configuration when I want it to be powerful. It still freaks (non-Python) people out though. Lua is not a half-bad choice if you ask me. It takes some time getting used to, but it's fast to interpret, and at least one project that I know of - Lsyncd - is making an absolutely great layered configuration on top of it.