Module Extended_monad.Make
The Make functor is used to create a module with reader and writer functions using the IO monad.
Parameters
Signature
The Make functor is used to create a module with reader and writer functions using the IO monad. This has the signature
module type IO = sig
type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
endinclude Jsonxt__.Reader_monad.Reader_monad with type json := Extended.Compliance.json and module IO := IO
module IO : Jsonxt__.Io.IOval read_json : ?stream:bool -> reader:(Stdlib.Bytes.t -> int -> int IO.t) -> unit -> (json, string) Stdlib.result IO.tread_jsontakes areaderfunction and returns ajsonvalue or an error if the string has syntax, grammar or compliance errors. Thereader buf lenparameter reads at mostlenbytes intobufand returns the number of bytes read. Zero indicates end of file. The optionalstreamparameter specifies if multiplejsonobjects are to be read, defaulting tofalse
include Jsonxt__.Writer_monad_intf.Intf with type json := Extended.Compliance.json and module IO := IO
module IO : Jsonxt__.Io.IOval json_writer : writer:(string -> unit IO.t) -> eol:string -> incr:int -> psep:string -> json -> unit IO.tjson_writer ~writer ~eol ~incr ~psep jsonconvertsjsonto a stringsand writes it out using thewriter stringfunction.incr,eolandpsepwork together to output human readable output.incrdefines the increase in indentation,eolthe end of line sequence andpsepthe string to seperate the : from the value in objectsThe
writer stringfunction takes a string and returns aunit IO.t