package jsonxt

  1. Overview
  2. Docs

Module JsonxtSource

JSON parsers for files, strings and more

Jsonxt provides a number JSON parsers and writers with a focus on performance for the core file and string functions

Parsers

Jsonxt provides a number of different JSON parsers supporting various access methods and levels of compliance with the JSON standard. Access methods include

  • File and string parsing including Stream.t support
  • A stream parser, that delivers a stream of json tokens rather than a whole json tree, with Stream.t support.
  • a monadic parser

JSON compliance has a number of levels

  • Extended supports floats and integers as well as tuples and variants from Yojson
  • Basic supports floats and integers
  • Strict only supports floats with integers converted to floats

In addition Yojson compatability modules supports basic Yojson functions including inter-operability with ppx_deriving_yojson and ppx_yojson_conv

Writers

Jsonxt supports writers for each of the access methods and compliance levels including compact and human readable versions. This includes

  • File, string and channel output
  • Stream writer for a json token stream such as produced by the stream parser
  • A monadic writer

Modules

Sourcemodule Json : sig ... end

Json types for the various compliance levels

Sourcemodule Json_stream : sig ... end

Json stream types for the various compliance levels

Sourcemodule Basic : sig ... end

Basic supports parsing and writing JSON data that conforms to the Json.Basic.json json type. This includes support for integers which are not part of the JSON standard

Sourcemodule Basic_stream : sig ... end

Basic_stream supports parsing and writing JSON data that conforms to the Json_stream.Basic.json type as a stream of Json_stream.Basic.json objects. This includes support for integers which are not part of the JSON standard

Sourcemodule Basic_monad : sig ... end

Basic_monad supports parsing and writing JSON data that conforms to the Json.Basic.json json type using reader and writer funtions that implement the IO monad. Support for integers, which are not part of the JSON standard, is included

Sourcemodule Extended : sig ... end

Extended supports parsing and writing JSON data that conforms to the Json.Extended.json json type. This supports non-standard JSON types including integer as well as tuples and variants introduced by Yojson.

Sourcemodule Extended_stream : sig ... end

Extended_stream supports parsing and writing JSON data that conforms to the Json_stream.Extended.json type as a stream of Json_stream.Extended.json objects. This supports non-standard JSON types including integer as well as tuples and variants introduced by Yojson

Sourcemodule Extended_monad : sig ... end

Extended_monad supports parsing and writing JSON data that conforms to the Json.Extended.json json type using reader and writer funtions that implement the IO monad. This supports non-standard JSON types including integer as well as tuples and variants introduced by Yojson

Sourcemodule Strict : sig ... end

Strict supports parsing and writing JSON data that conforms to the Json.Strict.json json type. This only supports types supported by the JSON standard and explicity excludes integers. However, when encoded in floats integers in the range (+/-)2^53 have no loss of precision

Sourcemodule Strict_stream : sig ... end

Strict_stream supports parsing and writing JSON data that conforms to the Json_stream.Strict.json type as a stream of Json_stream.Strict.json objects. This only supports types supported by the JSON standard and explicity excludes integers

Sourcemodule Strict_monad : sig ... end

Strict_monad supports parsing and writing JSON data that conforms to the Json.Strict.json json type using reader and writer funtions that implement the IO monad. This only supports types supported by the JSON standard and explicity excludes integers

Sourcemodule Utilities : sig ... end

json tree conversion functions

Sourcemodule Error_info : sig ... end

Parsing error handling

Sourcemodule Yojson : sig ... end

Yojson compatibility module

OCaml

Innovation. Community. Security.