Module Data_encoding.Json
include module type of struct include Data_encoding.Json end
type json = [
|
`A of json list
|
`Bool of bool
|
`Float of float
|
`Null
|
`O of (string * json) list
|
`String of string
]
type schema = Json_schema.schema
val encoding : json Data_encoding__V1.Encoding.t
val schema_encoding : schema Data_encoding__V1.Encoding.t
val convert : 'a Data_encoding__V1.Encoding.t -> 'a Json_encoding.encoding
val schema :
?definitions_path:string ->
'a Data_encoding__V1.Encoding.t ->
schema
type jsonm_lexeme = [
|
`Ae
|
`As
|
`Bool of bool
|
`Float of float
|
`Name of string
|
`Null
|
`Oe
|
`Os
|
`String of string
]
val construct_seq :
't Data_encoding__V1.Encoding.t ->
't ->
jsonm_lexeme Stdlib.Seq.t
val string_seq_of_jsonm_lexeme_seq :
newline:bool ->
chunk_size_hint:int ->
jsonm_lexeme Stdlib.Seq.t ->
string Stdlib.Seq.t
val small_string_seq_of_jsonm_lexeme_seq :
newline:bool ->
jsonm_lexeme Stdlib.Seq.t ->
string Stdlib.Seq.t
val blit_instructions_seq_of_jsonm_lexeme_seq :
newline:bool ->
buffer:bytes ->
jsonm_lexeme Stdlib.Seq.t ->
(Stdlib.Bytes.t * int * int) Stdlib.Seq.t
and path_item = [
|
`Field of string
|
`Index of int
|
`Next
|
`Star
]
exception Cannot_destruct of path * exn
exception Unexpected of string * string
exception No_case_matched of exn list
exception Bad_array_size of int * int
exception Missing_field of string
exception Unexpected_field of string
val print_error :
?print_unknown:(Stdlib.Format.formatter -> exn -> unit) ->
Stdlib.Format.formatter ->
exn ->
unit
val cannot_destruct :
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 ->
'a
val wrap_error : ('a -> 'b) -> 'a -> 'b
val from_string : string -> (json, string) Stdlib.result
val to_string : ?newline:bool -> ?minify:bool -> json -> string
val pp : Stdlib.Format.formatter -> json -> unit
val construct : 'a Data_encoding__V1.Encoding.t -> 'b -> json
val destruct : 'a Data_encoding__V1.Encoding.t -> json -> 'b