Legend:
Library
Module
Module type
Parameter
Class
Class type
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.
Use 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.