Module Writer_stream.Make
Parameters
Signature
val create_encoder' : add_char:(char -> unit) -> add_string:(string -> unit) -> incr:int -> eol:string -> tcreate_encoder' ~add_char ~add_string ~incr ~eolis the low level function used to create the various stream encoders. Theadd_char candadd_string sfunctions handle adding acharcandstringsto the output respectively.incrandeolwork together to output human readable output.incrdefines the increase in indentation andeolthe end of line sequence. A typetis returned
val create_encoder : add_char:(char -> unit) -> add_string:(string -> unit) -> tcreate_encoder ~add_char ~add_stringcreates a compact encoder.add_charandadd_stringadd acharandstringto the output respectively A typetis returned
val create_encoder_hum : add_char:(char -> unit) -> add_string:(string -> unit) -> tcreate_encoder_hum ~add_char ~add_stringcreates a human readable encoder.add_charandadd_stringadd acharandstringto the output respectively. The increment is set to 2 and end of line LF (\n). A typetis returned
val create_encoder_channel : Stdlib.out_channel -> tcreate_encoder_channel occreates a compact encoder outputing to channeloc
val create_encoder_channel_hum : Stdlib.out_channel -> tcreate_encoder_channel_hum occreates a human readable encoder outputing to channeloc
val encode_stream_exn : t -> 'a Jsonxt__.Json_internal.constrained_stream -> unitencode_stream_exn t json_streamencodes and outputs the elementjson_stream. Errors cause a Failure exception to be raised.
val encode_stream : t -> 'a Jsonxt__.Json_internal.constrained_stream -> (unit, string) Stdlib.resultencode_stream_exn t json_streamencodes and outputs the elementjson_stream. Errors are reported via theresultvalue.