[Libguestfs] [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.

Richard W.M. Jones rjones at redhat.com
Mon Aug 20 14:15:29 UTC 2018


On Mon, Aug 20, 2018 at 03:22:02PM +0200, Pino Toscano wrote:
> On Friday, 17 August 2018 17:16:10 CEST Richard W.M. Jones wrote:
> > Commit bd1c5c9f4dcf38458099db8a0bf4659a07ef055d changed all the code
> > to use Jansson instead of yajl.  However it didn't change the OCaml
> > API name (which was still Yajl).
> 
> This was done initially to avoid much larger patch/series for the
> yajl -> jansson conversion.  And then... I forgot :-)
> 
> > -type yajl_val =
> > -| Yajl_null
> > -| Yajl_string of string
> > -| Yajl_number of int64
> > -| Yajl_double of float
> > -| Yajl_object of (string * yajl_val) array
> > -| Yajl_array of yajl_val array
> > -| Yajl_bool of bool
> > +type json_parser_val =
> > +| JSON_parser_null
> > +| JSON_parser_string of string
> > +| JSON_parser_number of int64
> > +| JSON_parser_double of float
> > +| JSON_parser_object of (string * json_parser_val) array
> > +| JSON_parser_array of json_parser_val array
> > +| JSON_parser_bool of bool
> 
> I'd drop the _parser_ from the name, as seems redundant (and makes
> both type name, and all its values long enough...).

How about a "unifying JSON" patch to follow up instead?
Let me see how easy or otherwise that would be ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list