Make.Data_encoding
type json = [
|
`O of (string * json) list
|
`Bool of bool
|
`Float of float
|
`A of json list
|
`Null
|
`String of string
]
In memory JSON data
type 'a encoding = 'a t
val classify : 'a encoding -> [ `Fixed of int | `Dynamic | `Variable ]
val null : unit encoding
val empty : unit encoding
val unit : unit encoding
val constant : string -> unit encoding
val int8 : int encoding
val uint8 : int encoding
val int16 : int encoding
val uint16 : int encoding
val int31 : int encoding
val int32 : int32 encoding
val int64 : int64 encoding
val bool : bool encoding
val string : string encoding
val bytes : bytes encoding
val string_enum : (string * 'a) list -> 'a encoding
module Fixed : sig ... end
module Variable : sig ... end
module Bounded : sig ... end
val json_schema : json_schema encoding
type 'a matching_function = 'a -> match_result
val matched : ?tag_size:tag_size -> int -> 'a encoding -> 'a -> match_result
val matching :
?tag_size:tag_size ->
't matching_function ->
't case list ->
't encoding
val conv :
('a -> 'b) ->
('b -> 'a) ->
?schema:json_schema ->
'b encoding ->
'a encoding
val conv_with_guard :
('a -> 'b) ->
('b -> ('a, string) Pervasives.result) ->
?schema:json_schema ->
'b encoding ->
'a encoding
val with_decoding_guard :
('a -> (unit, string) Pervasives.result) ->
'a encoding ->
'a encoding
val force_decode : 'a lazy_t -> 'a option
val force_bytes : 'a lazy_t -> bytes
val apply_lazy :
fun_value:('a -> 'b) ->
fun_bytes:(bytes -> 'b) ->
fun_combine:('b -> 'b -> 'b) ->
'a lazy_t ->
'b
module Json : sig ... end
module Binary : sig ... end