Key-value attributes as json in hammer

Hello,
I'm working on a fix for hammer not being able to use certain values
when setting parameters for s new host [1].

The current format used for structured options like --parameters in
hammer is quite limited. It only allows for entering either
–parameters='key1=value1,key2=value2' or
–parameters='key1=[val1,val2,val3]' for arrays.
It's not capable of any nesting of values and it also fails when it
comes to values with spaces.

The same format is used also for setting attributes for volumes,
interfaces and virtual machines in host creation.

I've opened a PR [2] which is adding support for entering structured
options in json. Users are probably quite familiar with json and it
brings in unlimited possibilities for nesting the values.

The PR keeps backward compatibility so alongside with the new format like:
–parameters='{"key1": "value1", "nested": {"array": [1, 2]}}'
it's still possible to use the original key=value.

Do you see any disadvantages in using json? Are you aware of better
solutions or do you have any objections? Please let me know.

Regards
Tomas

[1] Bug #12869: hammer fails with parameters that contains a commas - Hammer CLI - Foreman
[2] https://github.com/theforeman/hammer-cli/pull/197