[Info-vax] XML, JSON and YAML, was: Re: Security, support and VMS, was: Re: A new VMS?
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Tue May 4 16:45:37 EDT 2021
On 2021-05-04, Arne Vajhøj <arne at vajhoej.dk> wrote:
>
> Which of the below are most readable?
>
JSON, especially if it is formatted in Whitesmiths style.
> XML:
>
><abc>
> <ab>
> <a>1</a>
> <b>2</b>
> </ab>
> <c>3</c>
></abc>
>
This has structure, but is really ugly to read.
> JSON:
>
> { "ab": {
> "a": 1,
> "b": 2
> },
> "c" : 3
> }
>
This has structure and it is the best of the 3 options.
> YAML:
>
> ab:
> a: 1
> b: 2
> c: 3
>
This is horrible and does not have enough structure to be robust
against editing errors when being manually edited.
Errors in both XML and JSON can be detected much more reliably
by a parser than errors in the above YAML example.
YAML was clearly created by the kind of person who thinks the
Rust language is too verbose, but would probably be well at home
if using TECO. :-)
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list