On 1/28/20 6:54 AM, Kevin Wolf wrote:


The arguments as dotted keys:

     id=bar,backend.type=file,backend.data.out=/tmp/bar.log

Observe there's quite some of nesting.  While that's somewhat cumbersome
in JSON, it's a lot worse with dotted keys, because there nesting means
repeated key prefixes.  I could give much worse examples, actually.

This is true, but even without the repeated keys (e.g. in a syntax that
would use brackets), it would still be unnecessarily verbose and
probably hard to remember:

     id=bar,backend={type=file,data={out=/tmp/bar.log}}

With shells like bash, that would need quoting to avoid unintended brace expansions. It is not the end of the world to require shell quoting (and passing JSON on the command line definitely needs it), but a syntax that avoids shell quoting is marginally easier to type and reason about.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to