package repr

  1. Overview
  2. Docs

Module Repr.JsonSource

Overlay on top of Jsonm to work with rewindable streams.

Sourcetype decoder

The type for JSON decoder.

Sourceval decoder : ?encoding:[< Jsonm.encoding ] -> [< Jsonm.src ] -> decoder

Same as Jsonm.decoder.

Sourceval decode : decoder -> [> `Await | `End | `Error of Jsonm.error | `Lexeme of Jsonm.lexeme ]

Same as Jsonm.decode.

Sourceval rewind : decoder -> Jsonm.lexeme -> unit

rewind d l rewinds l on top of the current state of d. This allows to put back lexemes already seen.

Sourceval assoc : 'a Repr__.Type.t -> (string * 'a) list Repr__.Type.t

assoc v is the typerepr of an association list (assoc) in which keys are strings and values are of typerepr v. The JSON codec represents such an assoc as a JSON object.

OCaml

Innovation. Community. Security.