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 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.