package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.9.tbz
sha512=45cdf73c6a23c8fc4609a32ae2196d4790e5bdba34ca0b784bff9c0b70dab233eb336f1c11dc3002451042ff4cf25b643098ad0d011f14c3d6175842113bed21

doc/brr/Brr/Json/index.html

Module Brr.JsonSource

JSON codec.

As codec by the JSON object.

Note. This interface is not particularly useful for programming in OCaml. To map JSON schemas to OCaml and back, describe your JSON with jsont. The jsont.brr library can use these descriptions with the JSON codec provided by your JavaScript runtime.

Sourcetype t = Jv.t

The type for JSON values.

Sourceval encode : t -> Jstr.t

encode v encodes v to JSON using JSON.stringify.

Warning. Do not expect an encode on a Jv.repr of an OCaml value to be decoded back by decoded.

Sourceval decode : Jstr.t -> (t, Jv.Error.t) result

decode s decodes the JSON text s into a JavaScript value using JSON.parse.