This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH V7 6/7] libxl: Introduce JSON parsing stuff.
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Date: Thu, 21 Jul 2011 16:02:14 +0100
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 21 Jul 2011 08:07:00 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Npim56abZQtRizKUHaSLwf2otbT54O5iZIQYbDjzAU4=; b=lprd6Ki4NYAStD29AXcOR9ipLjGT5TaPo2SFXod8eAQ0YMXIVvzGxcpQtDTV8+JWnM hDC4d7nymnZZD6fkMojCleHkJ3KtrnMJT0UEtrD8qeUh+TMYO5GAKx4I3AW7//Umystu FgKIsnFUsGaEKJhvb88d0okq+lp9ZNfo4CVTY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1311259256.32010.161.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1311197072-16003-1-git-send-email-anthony.perard@xxxxxxxxxx> <1311197072-16003-7-git-send-email-anthony.perard@xxxxxxxxxx> <1311259256.32010.161.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>