search for: json_optional_printf_stringlist

Displaying 3 results from an estimated 3 matches for "json_optional_printf_stringlist".

2014 May 26
2
[PATCH] builder: support aliases for images (RHBZ#1098718).
...; let notes = Languages.find_notes langs notes in (match notes with | notes :: _ -> @@ -116,6 +122,15 @@ and list_entries_json ~sources index = | None -> () | Some n -> printf " \"%s\": \"%Ld\",\n" key n in + let json_optional_printf_stringlist key = function + | None -> () + | Some l -> + printf " \"%s\": [" key; + iteri ( + fun i alias -> + printf " \"%s\"%s" alias (trailing_comma i (List.length l)) + ) l; + printf " ],\n" in let p...
2014 Oct 10
0
[PATCH 3/3] builder: use the JSON module
...() - | 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 ( - fun i alias -> - printf " \"%s\"%s" alias (trailing_comma i (List.length l)) - ) l; - printf " ],\n" in - let p...
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