package orsetto
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=81283687ce3204263bc955a332dd7b90bf5b648a990c01160f33aaa77d80962f
    
    
  md5=7346293aa013c2a8974c6fb7c521166a
    
    
  doc/orsetto.json/Json_event/index.html
Module Json_event
JavaScript Object Notation (JSON) events.
Overview
As defined in ECMA-404 and RFC 8259, a JSON text is a sequence of Unicode characters conforming to a formally defined grammar comprising structured data.
This module provides a safe interface for constructing valid JSON events used by the scanners and emitters defined in Json_scan and Json_emit.
Types
The type of sequencing signals.
type t = private - | Space
- | Null
- | False
- | True
- | Zero
- | Integer of int
- | Int64 of int64
- | Float of float
- | String of Ucs_text.t
- | Signal of signal
The private type of JSON events.
Equivalence relation
include Cf_relations.Equal with type t := t
Constructors
val space : tThe distinguished "space" event.
val null : tThe distinguished "null" event.
val boolean : bool -> tUse boolean b to select either the distinguished "true" or "false" event according to b.
val zero : tThe distinguished numeric zero event.
val integer : int -> tUse integer n to make a numeric event Integer n, or Zero in the special case that n = 0.
val int64 : int64 -> tUse int64 n to make a numeric event Int64 n, Integer n or Zero in the special case that n = 0.
val float : float -> tUse float n to make a numeric event representing n. If n is a zero, then the result is Zero. Otherwise if the value of n can be represented as an OCaml integer without overflow or truncation, then the result is Integer (Float.to_int n). Otherwise, if n is a number and is not an infinity, then Float n is the result. Finally, in the cases where n is an infinity or not a number, raises Invalid_argument.
val string : Ucs_text.t -> tUse string t to make String t.