XML Output: libxo - provide single API to output TXT, XML, JSON and HTML

Jos Backus jos at catnook.com
Tue Jul 29 05:18:45 UTC 2014


On Jul 28, 2014 9:49 PM, "Jordan Hubbard" <jkh at mail.turbofuzz.com> wrote:
>
>
> On Jul 27, 2014, at 11:06 PM, Jos Backus <jos at catnook.com> wrote:
>
> > It would be great if libyaml and libucl would converge, but instead it's
> > likely that the number of solutions trying to solve the same problem
will
> > continue to proliferate, and we are stuck with more and more
configuration
> > file formats :-(
>
> I’m a huge fan of unified data formats; Apple picked XML and the plist
DTD a long time ago, a decision which has worked rather nicely in practice,
but I’m more in love with the unification that produced than I am in love
with XML itself.  That said, it seems like this late push for YAML is a
similar case for divergence just because…erm… you don’t like JSON?  It
seems like libucl has basically backed JSON with the addition of a little
syntactic sugar, so what’s wrong with that?

In general, as a tool, JSON is more limited/less expressive than YAML. Now
YAGNI may apply here but I personally am not sure so I'm tempted to opt for
the more flexible tool because of that. I could be wrong and maybe JSON is
all that's ever needed.

> Is there some reason JSON is not sufficient?  I think that’s a better
question to ask, since the conversation otherwise quickly tends to sound a
little like “I’ll accept any single unified format as long as it’s the
specific one I like!” :)   I think the greater good argument would suggest
just picking one that’s expressive enough (roll a pair of dice), put on
your bikeshed-proof sunglasses, and proceed.

That's a good point, and one I don't really disagree with. The main goal
here is to get us machine parsable output.

But part of me is sad because it's a lost opportunity to promote the more
flexible format. One of the reasons JSON is so popular is the network
effect, I think (it's popular because it's popular). Oh well. :)

Jos

>
> - Jordan
>


More information about the freebsd-arch mailing list