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

Jos Backus jos at catnook.com
Tue Jul 29 06:31:54 UTC 2014


On Jul 28, 2014 11:29 PM, "Adrian Chadd" <adrian at freebsd.org> wrote:
>
> On 28 July 2014 23:03, Jos Backus <jos at catnook.com> wrote:
> >
> > On Jul 28, 2014 10:57 PM, "Adrian Chadd" <adrian at freebsd.org> wrote:
> >>
> >> Holy ... !
> >>
> >> What really matter is whether the library API that you're going to
> >> shoehorn into plenty of utilities is expressive enough to express a
> >> whole bunch of different output types.
> >>
> >> So it doesn't matter if you want JSON, or YAML, or XML, or the native
> >> tool output. The trick is whether the library API is good enough.
> >>
> >> So if you want to win people over, just make sure it gets adopted
> >> throughout other tools. :)
> >
> > Wouldn't the API be a way to build up an in-memory combination of lists
and
> > maps in most cases, which then gets serialized out at emission time?
Kind of
> > like calling object.to_yaml, where object is a Hash, but in C?
> >
>
> Not everything can be buffered like that over time. Time series data
> may have stuff buffered up during an output / sample period (eg the
> one a second output from vmstat 1)

YAML has support for document streams, which might come in handy here :)

Jos

>
>
> -a


More information about the freebsd-arch mailing list