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

Pino Toscano ptoscano at redhat.com
Mon Aug 20 13:22:02 UTC 2018


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...).

The rest of it LGTM.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180820/6914dca4/attachment.sig>


More information about the Libguestfs mailing list