NestedText, a nice alternative to JSON, YAML, TOML
I have had great experience using JSONNET (<a href="https:&#x2F;&#x2F;jsonnet.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jsonnet.org&#x2F;</a>) as a configuration language. It supports variables, inheritance, operators, functions, substitutions, types, with just the right amount of power, expressiveness, and simplicity.<p>In my opinion, JSON is best used as a wire-protocol. It is awkward as a configuration language.<p>YAML works for short configs, but becomes unmaintainable for longer configs. I think the primary problem is that the indentation is significant. I also think the language spec is far too complex.<p>INI format works for short configs, but also becomes unmaintainable for longer configs. Ironically I think this is because INI is too primitive, the opposite problem of YAML, but has the same effect.<p>I am not familiar with TOML or DHALL, mostly because I stopped looking after I implemented the JSONNET system and liked it so much.<p><i>Addendum</i>: I have used text-formatted protobufs in limited situations with good results. But I don&#x27;t think that protobufs is a good general purpose configuration language.<p><i>Addendum2</i>: The amazing thing about simplicity of the INI file format is that I was able to write a &quot;single line&quot; sed program to parse it in a bash script. The following finds the value of the $key in the $section in the $config_file INI file (definitely works on GNU sed, I think it works on MacOS sed too, not 100% sure though):<p><pre><code>    sed -n -E -e \
        &quot;:label_s;
        &#x2F;^\[$section\]&#x2F; {                                                       
            n;                                                                  
            :label_k;                                                           
            &#x2F;^ *$key *=&#x2F; {                                                      
                s&#x2F;[^=]*= *&#x2F;&#x2F;; p; q;                                             
            };                                                                  
            &#x2F;^\[.*\]&#x2F; b label_s;                                                
            n;
            b label_k;
        }&quot; \
        &quot;$config_file&quot;</code></pre>