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 := Jsonxt.Extended.Compliance.json and module IO := IO
module IO : Jsonxt__.Io.IO- val read_json : ?stream:bool -> reader:(Stdlib.Bytes.t -> int -> int IO.t) -> unit -> (json, string) Stdlib.result IO.t
- read_jsontakes a- readerfunction and returns a- jsonvalue or an error if the string has syntax, grammar or compliance errors. The- reader buf lenparameter reads at most- lenbytes into- bufand returns the number of bytes read. Zero indicates end of file. The optional- streamparameter specifies if multiple- jsonobjects are to be read, defaulting to- false
include Jsonxt__.Writer_monad_intf.Intf with type json := Jsonxt.Extended.Compliance.json and module IO := IO
module IO : Jsonxt__.Io.IO- val json_writer : writer:(string -> unit IO.t) -> eol:string -> incr:int -> psep:string -> json -> unit IO.t
- json_writer ~writer ~eol ~incr ~psep jsonconverts- jsonto a string- sand writes it out using the- writer stringfunction.- incr,- eoland- psepwork together to output human readable output.- incrdefines the increase in indentation,- eolthe end of line sequence and- psepthe string to seperate the : from the value in objects- The - writer stringfunction takes a string and returns a- unit IO.t