Displaying 8 results from an estimated 8 matches for "json_optional_printf_int64".
2014 Jan 22
1
[PATCH] builder: small code simplification
...e 1 c)
done;
!res in
- let json_optional_printf_string key value =
- match value with
+ let json_optional_printf_string key = function
| None -> ()
| Some str ->
printf " \"%s\": \"%s\",\n" key (json_string_escape str) in
- let json_optional_printf_int64 key value =
- match value with
+ let json_optional_printf_int64 key = function
| None -> ()
| Some n ->
printf " \"%s\": \"%Ld\",\n" key n in
--
1.8.3.1
2014 Jan 16
0
[PATCH 3/3] builder: add a JSON output for --list
...> "\\t"
+ | c -> String.make 1 c)
+ done;
+ !res in
+ let json_optional_printf_string key value =
+ match value with
+ | None -> ()
+ | Some str ->
+ printf " \"%s\": \"%s\",\n" key (json_string_escape str) in
+ let json_optional_printf_int64 key value =
+ match value with
+ | None -> ()
+ | Some n ->
+ printf " \"%s\": \"%Ld\",\n" key n in
+
+ printf "{\n";
+ printf " \"version\": %d,\n" 1;
+ printf " \"sources\": [\n";
+ iteri...
2014 Oct 10
0
[PATCH 3/3] builder: use the JSON module
...| '\t' -> "\\t"
- | c -> String.make 1 c)
- done;
- !res in
- let json_optional_printf_string key = function
- | None -> ()
- | Some str ->
- printf " \"%s\": \"%s\",\n" key (json_string_escape str) in
- let json_optional_printf_int64 key = function
- | None -> ()
- | Some n ->
- printf " \"%s\": \"%Ld\",\n" key n in
- let json_optional_printf_stringlist key = function
- | None -> ()
- | Some l ->
- printf " \"%s\": [" key;
- iteri (...
2014 May 26
2
[PATCH] builder: support aliases for images (RHBZ#1098718).
...= aliases;
hidden = hidden }) ->
printf " {\n";
printf " \"os-version\": \"%s\",\n" name;
@@ -164,6 +180,7 @@ and list_entries_json ~sources index =
printf " \"size\": %Ld,\n" size;
json_optional_printf_int64 "compressed-size" compressed_size;
print_notes notes;
+ json_optional_printf_stringlist "aliases" aliases;
printf " \"hidden\": %s\n" (json_string_of_bool hidden);
printf " }%s\n" (trailing_comma i (List.length index))...
2014 Jan 16
5
[PATCH 0/3] Add JSON output for virt-builder
Hi,
This small patch serie adds a JSON output for virt-builder.
This way it is possible to parse the list of available templates,
with no need to parse the unstructured and possibly changing short and
long outputs of virt-builder.
Pino Toscano (3):
builder: small refactor of the list output
builder: add --list-format
builder: add a JSON output for --list
builder/builder.ml
2014 Feb 24
2
[PATCH] builder: add a mandatory 'arch' key in index files
...printf " \"os-version\": \"%s\",\n" name;
json_optional_printf_string "full-name" printable_name;
+ printf " \"arch\": \"%s\",\n" arch;
printf " \"size\": %Ld,\n" size;
json_optional_printf_int64 "compressed-size" compressed_size;
print_notes notes;
diff --git a/builder/test-index.in b/builder/test-index.in
index 1bca6b8..3efebc4 100644
--- a/builder/test-index.in
+++ b/builder/test-index.in
@@ -1,5 +1,6 @@
[phony-debian]
name=Phony Debian
+arch=x86_64
file=debian.xz
fo...
2014 Oct 10
4
[PATCH 1/3] Move JSON to mllib
Move the simple OCaml JSON writer to mllib, so that can be enhanced and
used also outside v2v.
---
mllib/JSON.ml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
mllib/JSON.mli | 26 ++++++++++++++++++++++++++
mllib/Makefile.am | 5 ++++-
po/POTFILES-ml | 2 +-
v2v/JSON.ml | 53 -----------------------------------------------------
v2v/JSON.mli | 26
2014 Jan 22
2
[PATCH] builder: read all the available notes from the index
...-> () in
printf "{\n";
printf " \"version\": %d,\n" 1;
@@ -132,7 +136,7 @@ and list_entries_json ~sources index =
json_optional_printf_string "full-name" printable_name;
printf " \"size\": %Ld,\n" size;
json_optional_printf_int64 "compressed-size" compressed_size;
- json_optional_printf_string "notes" notes;
+ print_notes notes;
printf " \"hidden\": %s\n" (json_string_of_bool hidden);
printf " }%s\n" (trailing_comma i (List.length index))
) ind...