Alas, Juju does not provide richer data structures than simple strings, integers and boolean (most likely deliberately, to simplify CLI setting of the fields, although there are open bugs on adding this feature).
I've never come across a more usable approach than the trick of using the YAML | string escape mechanism to embed richer data structures. I'm flagging this as a duplicate of Bug #1320080, as unless someone can come up with a more usable approach we are stuck with this awful API (both in charm-helpers and the apt layer).
Alas, Juju does not provide richer data structures than simple strings, integers and boolean (most likely deliberately, to simplify CLI setting of the fields, although there are open bugs on adding this feature).
I've never come across a more usable approach than the trick of using the YAML | string escape mechanism to embed richer data structures. I'm flagging this as a duplicate of Bug #1320080, as unless someone can come up with a more usable approach we are stuck with this awful API (both in charm-helpers and the apt layer).