[ale] Ubuntu 18.04 release notes

leam hall leamhall at gmail.com
Fri Apr 27 13:06:45 EDT 2018


YAML spacing drives my nuts on a frequent basis since I use Ansible.
However, JSON dies if you miss a comma.

On Fri, Apr 27, 2018 at 1:00 PM, Alex Carver via Ale <ale at ale.org> wrote:
> On 2018-04-27 09:43, Kyle Brieden via Ale wrote:
>> https://twitter.com/sadoperator/status/989895215442837504
>>
>> But seriously, though, I appreciate YAML for what it is, and that is "a
>> human readable markup language".  It's easy to look over it and suss out
>> what is what, much like JSON.  I prefer JSON to YAML, but they're both
>> widely used and well implemented most of the time.
>
> JSON is reasonably human readable and certainly does not depend on
> indentation to read it.
>
> I can read and write this:
>
> {
> "array1": {"A", "B", "C", "D"},
> "struct1": {"param1": val, "param2": val},
> "struct2": {"param3": val, "param4": val}
> "list":
>     {
>         {"list_item_id": id, "list_item_name": "foo", "list_item_param": param },
>         {"list_item_id": id, "list_item_name": "foo", "list_item_param": param },
>         {"list_item_id": id, "list_item_name": "foo", "list_item_param": param }
>     }
> }
>
> far easier and with less likelihood of errors due to whitespace (since
> JSON doesn't care) or wrong flags (dashes or not) and overall alignment
> compared to:
>
> array1:
>     - A
>     - B
>     - C
>     - D
> struct1:
>     param1: val
>     param2: val
> struct2:
>     param3: val
>     param4: val
> list:
>     - list_item_id: id
>       list_item_name: foo
>       list_item_param: param
>     - list_item_id: id
>       list_item_name: foo
>       list_item_param: param
>     - list_item_id: id
>       list_item_name: foo
>       list_item_param: param
>
>
> Did I use tabs or spaces?  Do I have the list items in the right spot
> because not all of them use the dash?  Do the number of spaces between
> the dash and the name matter for the later items?  Plus all of the
> weirdness of additional flags like literal versus folded scalars where
> with the JSON I'd just embed the new lines where and when needed.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


More information about the Ale mailing list