package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.8.tbz
sha512=49e7bfbad2ea6a0139354e4a33c59c8a113c4c1e20a4f629bc5cad24aa801e474b4af10ce35adbda5d23dd294d1de5efa5b10bb3030d03f4758459977250a0f6

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.