Date: Mon, 28 Jul 2014 23:31:51 -0700 From: Jos Backus <jos@catnook.com> To: Adrian Chadd <adrian@freebsd.org> Cc: arch@freebsd.org, Jordan Hubbard <jkh@mail.turbofuzz.com> Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML Message-ID: <CAETOPp0qx%2BqVdn5VfLmbRCApo%2B0UwGkLp6K26NPo-TakW3YLLA@mail.gmail.com> In-Reply-To: <CAJ-VmomsrCoAYdfNwRGp42KA_AVitQ5U254kaYNZsQ7aWvu4VQ@mail.gmail.com> References: <20140725044921.9F0D3580A2@chaos.jnpr.net> <CAETOPp13H7kyLy-1VJRDOsDbOh8A1MWZDxw1xHUBsxTRtMfc7g@mail.gmail.com> <20140728054217.AC1A0580A2@chaos.jnpr.net> <20140728055336.GJ50802@ivaldir.etoilebsd.net> <CAETOPp3hJB8Gj%2BPMj3N951krnNqCYiAOY-cPHxMCBy1CQXWJaQ@mail.gmail.com> <A1E63A7A-BB38-4CC3-B5EC-B251BE990572@mail.turbofuzz.com> <CAETOPp0c1xfMj1vDvQRSoV3ec-LdJmyT9AFH02iziN0yuY1D-A@mail.gmail.com> <CAJ-VmomiwUWHWYLdLcQAnp7QBmvQR2wfPoCy=eie-jrvyw0HfA@mail.gmail.com> <CAETOPp3zkpp4PY-CeA4Ei=r7_tw1S6rVYiniU%2BZxQF3PESVAxA@mail.gmail.com> <CAJ-VmomsrCoAYdfNwRGp42KA_AVitQ5U254kaYNZsQ7aWvu4VQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 28, 2014 11:29 PM, "Adrian Chadd" <adrian@freebsd.org> wrote: > > On 28 July 2014 23:03, Jos Backus <jos@catnook.com> wrote: > > > > On Jul 28, 2014 10:57 PM, "Adrian Chadd" <adrian@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAETOPp0qx%2BqVdn5VfLmbRCApo%2B0UwGkLp6K26NPo-TakW3YLLA>