123456789101112131415161718192021222324252627moduletypeIntf=sigmoduleIO:Io.IOtypejson(** [json_writer ~writer ~eol ~incr ~psep json] converts [json] to a string [s]
and writes it out using the [writer string] function. [incr], [eol] and [psep]
work together to output human readable output. [incr] defines the increase
in indentation, [eol] the end of line sequence and [psep] the string to
seperate the : from the value in objects
The [writer string] function takes a string and returns a [unit IO.t]
*)valjson_writer:writer:(string->unitIO.t)->eol:string->incr:int->psep:string->json->unitIO.t(** [create_encoder ~writer] creates a compact encoder using [json_writer]. *)valwrite_json:writer:(string->unitIO.t)->json->unitIO.t(** [create_encoder ~writer] creates a human readable encoder using [json_writer]
with [incr] set to 2 and eol to '\n'. *)valwrite_json_hum:writer:(string->unitIO.t)->json->unitIO.tend