Module Reader_monad.Make

Parameters

Signature

module IO : Jsonxt__.Io.IO
type json = Parser.Compliance.json
val read_json : ?⁠stream:bool -> reader:(Stdlib.Bytes.t -> int -> int IO.t) -> unit -> (json, string) Stdlib.result IO.t

read_json takes a reader function and returns a json value or an error if the string has syntax, grammar or compliance errors. The reader buf len parameter reads at most len bytes into buf and returns the number of bytes read. Zero indicates end of file. The optional stream parameter specifies if multiple json objects are to be read, defaulting to false