Module Tpf_json
Generic JSON converters.
Generic injections / projections between a type and a general purpose JSON tree.
The tree type is non-generative, so it works with any underlying library for (de-)serialization. Howerver, the particular tree shape was chosen for compatibility with Joyson.
type json
=[
|
`Null
|
`Bool of bool
|
`Int of int
|
`Float of float
|
`String of string
|
`List of json list
|
`Assoc of (string * json) list
]
JSON trees.
Note. This is
Yojson
.Basic.t.
val pp_error : Stdlib.Format.formatter -> error -> unit
pp_error ppf e
pretty-printse
onppf
.
Encoders
type 'a e
= 'a -> json
Encoder type.
module Enc : sig ... end
Generic JSON encoder.
Decoders
module Dec : sig ... end
Generic JSON decoder.