A beginner's adventure in Charm authoring
roger peppe
rogpeppe at gmail.com
Mon Sep 8 09:13:39 UTC 2014
On 4 September 2014 20:13, Nate Finch <nate.finch at canonical.com> wrote:
> On Thu, Sep 4, 2014 at 3:26 AM, John Meinel <john at arbash-meinel.com> wrote:
>>>
>>> ...
>>
>>
>>>
>>> Have I mentioned how much I hate YAML? Is it possible to write the
>>> config in JSON or something instead? JSON's no picnic either, but at least
>>> it doesn't care about white space. I'd recommend TOML, but I doubt the
>>> conservative dev-ops people would go for it. Ideally we'd support all three
>>> (and other formats if people wanted).
>>
>>
>> Well, you can trivially write it in whatever you want and just have it
>> converted, right? I do feel like YAML would be more human friendly except it
>> has so many caveats and different ways to do the same thing.
>
>
> YAML is very easy to read, but writing it is a hassle. And for
> configuration files, the writing is the most important part. And yes, it's
> trivial to support multiple formats for the config file, we just have to
> agree it's a good idea and do it :)
I find the opposite - I find YAML hard to read because there
are so many possible ways of phrasing the same information,
but easy to write because you can just use JSON
(or whatever subset of YAML you feel comfortable with).
I usually write the JSON as RJSON (launchpad.net/rjson)
and convert to JSON before saving, making sure not to
use tabs for indentation.
Did you know about http://godoc.org/gopkg.in/juju-utils.v0/cmd/gocharm
BTW, which I wrote to try to make it easy to write charms in Go?
cheers,
rog.
More information about the Juju-dev
mailing list