Module Brr.Json
JSON codec.
As codec by the JSON object.
Warning. This interface will change in the future.
type t
= Jv.t
The type for JSON values. FIXME have something more abstract.
val encode : t -> Jstr.t
encode v
encodesv
to JSON using JSON.stringify.Warning. Do not expect an
encode
on aJv.repr
of an OCaml value to be decoded back bydecoded
.
val decode : Jstr.t -> (t, Jv.Error.t) Stdlib.result
decode s
decodes the JSON texts
into a JavaScript value using JSON.parse.