package jsonxt

  1. Overview
  2. Docs

Basic supports standard Json types that are supported by the JSON standard but also supports integers rather than just floats

type json = [
  1. | `Null
  2. | `Bool of bool
  3. | `Int of int
  4. | `Float of float
  5. | `String of string
  6. | `Assoc of (string * json) list
  7. | `List of json list
]

The following polymorphic variants supported

  • `Null: JSON null
  • `Bool of bool: JSON boolean
  • `Int of int: JSON number without decimal point or exponent.
  • `Float of float: JSON number. Infinity, NaN etc are not supported
  • `String of string: JSON string. Bytes in the range 128-255 are preserved when reading and writing.
  • `Assoc of (string * json) list: JSON object.
  • `List of json list: JSON array.
type t = json