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

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



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


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