Json utilities.
val read_json_file : (Yojson.lexer_state ‑> Lexing.lexbuf ‑> 'a) ‑> string ‑> 'aread_json_file reader fname reads the file fname using the
reader reader generated by atdgen.
val set : Wcs_t.json ‑> string ‑> Wcs_t.json ‑> Wcs_t.jsonset o x v add (or replace) the a field x of the object o with
value v.
val get : Wcs_t.json ‑> string ‑> Wcs_t.json optionget o x gets the value of the field x of the object o.
val take : Wcs_t.json ‑> string ‑> Wcs_t.json * Wcs_t.json optiontake o x gets the value of the field x of the object o and
remove the field from the object. The left part of the return value
is the modified object and the right part is the value of the
field.
val assign : Wcs_t.json list ‑> Wcs_t.jsonassign [o1; ...; on] create a json object that contains all the
fields of the objets o1, ..., on. It is similare the the JavaScript
function Object.assing({}, o1, ... on).
val push : Wcs_t.json ‑> string ‑> Wcs_t.json ‑> Wcs_t.jsonpush o x v add the value v in the list stored in a field x
of the object o. It the field x doesn't exists, it creates it.
val pop : Wcs_t.json ‑> string ‑> Wcs_t.json * Wcs_t.json optionpop o x take a value in a list stored in the field x of o.
val set_bool : Wcs_t.json ‑> string ‑> bool ‑> Wcs_t.jsonset_bool o x b sets the a field x of the object o with value
b.
val get_bool : Wcs_t.json ‑> string ‑> bool optionget_bool o x gets the value of the field x of the object o.
val set_string : Wcs_t.json ‑> string ‑> string ‑> Wcs_t.jsonset_string o x x sets the a field x of the object o with string
s.
val get_string : Wcs_t.json ‑> string ‑> string optionget_string o x gets the value of the field x of the object o.
val take_string : Wcs_t.json ‑> string ‑> Wcs_t.json * string optiontake_string o x takes the value of the field x of the object o.