Displaying 20 results from an estimated 42 matches for "json_parse".
Did you mean:
json_parser
2018 Aug 23
2
[PATCH 1/2] mltools: JSON: add json_parser_tree_parse_file
Easy way to parse JSON from a file, without reading it all to string
first.
---
common/mltools/JSON_parser-c.c | 25 +++++++++++++++++++++++++
common/mltools/JSON_parser.ml | 1 +
common/mltools/JSON_parser.mli | 3 +++
common/mltools/JSON_parser_tests.ml | 23 +++++++++++++++++++++++
4 files changed, 52 insertions(+)
diff --git a/common/mltools/JSON_parser-c.c b/common/mltools/JSON_...
2018 Aug 17
0
[PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
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 commit changes the module to a neutral name ("JSON_parser") and
moves it into common/mltools so it can be used by other tools.
This leaves us in a slightly awkward situation of having two JSON-ish
OCaml modules (JSON for creating trees and JSON_parser for parsing
them) with incompatible types. That is left for future work to
resolve. (It should b...
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
---
builder/simplestreams_parser.ml | 9 +-
.../test-virt-builder-list-simplestreams.sh | 64 ++++++-------
builder/utils.mli | 2 +-
common/mltools/JSON_parser-c.c | 96 ++++++++++++-------
common/mltools/JSON_parser.ml | 29 ++----
common/mltools/JSON_parser.mli | 25 ++---
common/mltools/JSON_parser_tests.ml | 77 +++++++--------
7 files changed, 156 insertions(+), 146 deletions(-)
diff --git a/b...
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 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
2018 Aug 17
0
Re: [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
On Friday, 17 August 2018 17:30:35 CEST Eric Blake wrote:
> On 08/17/2018 10:16 AM, 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).
> >
>
> Are you aware that Jansson can't parse all JSON generated
2018 Aug 17
0
Re: [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
On Fri, Aug 17, 2018 at 10:30:35AM -0500, Eric Blake wrote:
> On 08/17/2018 10:16 AM, 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).
> >
>
> Are you aware that Jansson can't parse all JSON generated
2018 Aug 20
1
Re: [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
...; 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 dr...
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...
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 17
1
Re: [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
On 08/17/2018 10:48 AM, Richard W.M. Jones wrote:
> On Fri, Aug 17, 2018 at 10:30:35AM -0500, Eric Blake wrote:
>> On 08/17/2018 10:16 AM, 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).
>>>
2018 Aug 17
4
Re: [PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
On 08/17/2018 10:16 AM, 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).
>
Are you aware that Jansson can't parse all JSON generated by qemu, and
that the developers of Jansson did not seem sympathetic to patches that
would
2020 Jan 28
0
[v2v PATCH 2/2] -o rhv-upload: check guest arch with cluster
...ID. *)
val mutable rhv_cluster_uuid = None
+ (* The cluster CPU architecture *)
+ val mutable rhv_cluster_cpu_architecture = None
(* List of disk UUIDs. *)
val mutable disks_uuids = []
(* If we didn't finish successfully, delete on exit. *)
@@ -272,6 +274,8 @@ object
Some (JSON_parser.object_get_string "rhv_storagedomain_uuid" json);
rhv_cluster_uuid <-
Some (JSON_parser.object_get_string "rhv_cluster_uuid" json);
+ rhv_cluster_cpu_architecture <-
+ Some (JSON_parser.object_get_string "rhv_cluster_cpu_architecture" json)...
2020 Jan 28
2
[v2v PATCH 1/2] Add back guestcaps as parameter of output#prepare_targets
It will be used to do extra checks in the output before copying the
disks.
Partially revert commit 3bafec4e693a25ef1c84abc0fd1bc3251862c7de.
---
v2v/output_glance.ml | 2 +-
v2v/output_json.ml | 2 +-
v2v/output_libvirt.ml | 2 +-
v2v/output_local.ml | 2 +-
v2v/output_null.ml | 2 +-
v2v/output_openstack.ml | 2 +-
v2v/output_qemu.ml | 2 +-
v2v/output_rhv.ml
2011 Nov 05
2
install.packages problem
...-o
JSONWriter.o
g++ -I/usr/share/R/include -I. -Ilibjson -Ilibjson/Source -DNDEBUG=1
-DJSON_NO_EXCEPTIONS=1 -fpic -O3 -pipe -g -c JSON_Base64.cpp -o
JSON_Base64.o
gcc -I/usr/share/R/include -I. -Ilibjson -Ilibjson/Source -DNDEBUG=1
-DJSON_NO_EXCEPTIONS=1 -fpic -std=gnu99 -O3 -pipe -g -c JSON_parser.c
-o JSON_parser.o
gcc -I/usr/share/R/include -I. -Ilibjson -Ilibjson/Source -DNDEBUG=1
-DJSON_NO_EXCEPTIONS=1 -fpic -std=gnu99 -O3 -pipe -g -c RJSON.c -o
RJSON.o
g++ -I/usr/share/R/include -I. -Ilibjson -Ilibjson/Source -DNDEBUG=1
-DJSON_NO_EXCEPTIONS=1 -fpic -O3 -pipe -g -c internalJ...
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...UUID. *)
+ val mutable rhv_storagedomain_uuid = None
+ (* The cluster UUID. *)
+ val mutable rhv_cluster_uuid = None
+
method precheck () =
Python_script.error_unless_python_interpreter_found ();
error_unless_ovirtsdk4_module_available ();
@@ -237,6 +242,10 @@ object
let json = JSON_parser.json_parser_tree_parse_file precheck_fn in
debug "precheck output parsed as: %s"
(JSON.string_of_doc ~fmt:JSON.Indented ["", json]);
+ rhv_storagedomain_uuid <-
+ Some (JSON_parser.object_get_string "rhv_storagedomain_uuid" json);
+ rhv_...
2018 Sep 24
0
Re: OpenStack output - server_id
...d.
> I don't know how to code that in OCaml, so I defer implementation to anyone
> with such skills. And by reading the patch, I may learn how to write small
> pieces of OCaml and contribute further changes :)
No real need to do it in OCaml. Easiest to string together the Curl &
JSON_parser modules.
https://github.com/libguestfs/libguestfs/blob/master/common/mltools/curl.mli
https://github.com/libguestfs/libguestfs/blob/master/common/mltools/JSON_parser.mli
What does the meta_data.json file actually look like?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.r...
2019 Dec 18
1
[PATCH] po: reduce the list of extracted sources
....c
cat/ls.c
cat/tail.c
common/edit/file-edit.c
-common/errnostring/errnostring-gperf.c
common/errnostring/errnostring.c
-common/mlcustomize/dummy.c
-common/mlgettext/dummy.c
-common/mlpcre/dummy.c
common/mlpcre/pcre-c.c
common/mlprogress/progress-c.c
-common/mlstdutils/dummy.c
common/mltools/JSON_parser-c.c
-common/mltools/dummy.c
common/mltools/getopt-c.c
common/mltools/tools_utils-c.c
common/mltools/uri-c.c
common/mlutils/c_utils-c.c
-common/mlutils/dummy.c
common/mlutils/unix_utils-c.c
-common/mlvisit/dummy.c
common/mlvisit/visit-c.c
common/mlxml/xml-c.c
common/options/config.c
@@ -43,...
2019 Dec 18
2
[v2v PATCH] po: do not extract tests
...common/mlgettext/common_gettext.ml
common/mlpcre/PCRE.ml
-common/mlpcre/pcre_tests.ml
common/mlstdutils/guestfs_config.ml
common/mlstdutils/std_utils.ml
-common/mlstdutils/std_utils_tests.ml
common/mlstdutils/stringMap.ml
common/mlstdutils/stringSet.ml
common/mltools/JSON.ml
common/mltools/JSON_parser.ml
-common/mltools/JSON_parser_tests.ml
-common/mltools/JSON_tests.ml
common/mltools/URI.ml
common/mltools/checksums.ml
common/mltools/curl.ml
common/mltools/getopt.ml
-common/mltools/getopt_tests.ml
-common/mltools/machine_readable_tests.ml
common/mltools/planner.ml
common/mltools/regedit.m...