[Libguestfs] [PATCH 1/1] Switch from YAJL to Jansson

Eric Blake eblake at redhat.com
Thu Nov 23 16:07:34 UTC 2017


On 11/23/2017 07:23 AM, Pino Toscano wrote:
> While YAJL mostly works fine, it did not see any active development in
> the latest 3 years.  OTOH, Jansson is another JSON C implementation,
> with a very liberal license, and a much nicer API.
> 
> Hence, switch all of libguestfs from YAJL to Jansson:
> - configure checks, and buildsystem in general
> - packages pulled in the appliance
> - actual implementations
> - contrib scripts
> - documentation
> 
> This also makes use of the better APIs available (e.g. json_object_get,
> json_array_foreach, and json_object_foreach).  This does not change the
> API of our OCaml Yajl module.
> 
> The only behaviour change is that Jansson by default accepts only
> objects and arrays as input (even though it has a flag to make it accept
> anything).  Since this seems a good idea anyway, and as it is the RFC
> behaviour, then change one of the yajl_tests checks accordingly.

Which RFC?

RFC 4627 stated that only objects or arrays could occur at the top
level.  But it was superseded by:

RFC 7159, which states that ANY json value can be the top level of the
grammar.

So maybe it's better to set the flags and always allow all objects.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20171123/4a2cb08c/attachment.sig>


More information about the Libguestfs mailing list