search for: json_parser_null

Displaying 8 results from an estimated 8 matches for "json_parser_null".

2018 Aug 22
3
Re: [PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
On Monday, 20 August 2018 18:02:06 CEST Richard W.M. Jones wrote: > - } else > - rv = Val_none; > + } > + else { > + /* Previously we had a special JSON_parser_null value we could > + * use here, making the returned type (sort of) an option. > + * This is a best effort which is better than crashing / > + * throwing an error. > + */ > + rv = caml_alloc (1, JSON_STRING_TAG); > + v = caml_copy_string (""); > +...
2018 Aug 20
1
Re: [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
...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, a...
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
...Store_field (rv, 0, Val_true); - } else if (json_is_false (val)) { - rv = caml_alloc (1, 5); + } + else if (json_is_false (val)) { + rv = caml_alloc (1, JSON_BOOL_TAG); Store_field (rv, 0, Val_false); - } else - rv = Val_none; + } + else { + /* Previously we had a special JSON_parser_null value we could + * use here, making the returned type (sort of) an option. + * This is a best effort which is better than crashing / + * throwing an error. + */ + rv = caml_alloc (1, JSON_STRING_TAG); + v = caml_copy_string (""); + Store_field (rv, 0, v); + }...
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of: https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2: - Added back the null value. - Reran the tests. Rich.
2018 Aug 22
0
Re: [PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
On Wed, Aug 22, 2018 at 01:20:55PM +0200, Pino Toscano wrote: > On Monday, 20 August 2018 18:02:06 CEST Richard W.M. Jones wrote: > > - } else > > - rv = Val_none; > > + } > > + else { > > + /* Previously we had a special JSON_parser_null value we could > > + * use here, making the returned type (sort of) an option. > > + * This is a best effort which is better than crashing / > > + * throwing an error. > > + */ > > + rv = caml_alloc (1, JSON_STRING_TAG); > > + v = caml_copy_...
2018 Aug 17
0
[PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
...20,19 @@ open Std_utils open Tools_utils open Common_gettext.Gettext -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 -external yajl_tree_parse : string -> yajl_val = "virt_builder_...
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to bake qemu-img measure output into our API. This patch series runs qemu-img measure behind the scenes, but then parses the output and sums it to a single number which we print. Doing that required a bit of reworking, moving the Jansson [JSON parser] bindings from virt-builder into the common directory and a couple of other