[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [PATCH V7 6/7] libxl: Introduce JSON parsing stuff.

On Thu, Jul 21, 2011 at 15:40, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> wrote:
> On Wed, 2011-07-20 at 22:24 +0100, Anthony PERARD wrote:
>> + Â Â/* parse the input */
>> + Â Âif (yajl_ctx.hand == NULL) {
>> + Â Â Â Â/* allow comments */
>> + Â Â Â Âyajl_parser_config cfg = { 1, 1 };
> Looks like YALJ v2 has enums for these config values but v1 doesn't.
> However
> Â Â Â Â Â Âyajl_parse_config cfg = {
> Â Â Â Â Â Â Â Â.allowComments = 1,
> Â Â Â Â Â Â Â Â.checkUTF8 = 1,
> Â Â Â Â Â Â};
> is a bit more self documenting.
> (supporting yajl 1 and 2 is going to be a pain. but lets cross that
> bridge when we come to it...)

With the V2, there is "yajl_tree_parse" that basicly do the same as
libxl__json_parse. I try to be closer to the tree implementation of
the V2, but yes, it will sill be painfull to support both. If we can
only support the v1, and change to the v2 later (when widly availlable
in distribution), it should be OK.

Anthony PERARD

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.