Module Jsonxt
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.tsupport - A stream parser, that delivers a stream of json tokens rather than a whole json tree, with
Stream.tsupport. - 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
module Json : sig ... endJson types for the various compliance levels
module Json_stream : sig ... endJson stream types for the various compliance levels
module Basic : sig ... endBasicsupports parsing and writing JSON data that conforms to theJson.Basic.jsonjson type. This includes support for integers which are not part of the JSON standard
module Basic_stream : sig ... endBasic_streamsupports parsing and writing JSON data that conforms to theJson_stream.Basic.jsontype as a stream ofJson_stream.Basic.jsonobjects. This includes support for integers which are not part of the JSON standard
module Basic_monad : sig ... endBasic_monadsupports parsing and writing JSON data that conforms to theJson.Basic.jsonjson type using reader and writer funtions that implement the IO monad. Support for integers, which are not part of the JSON standard, is included
module Extended : sig ... endExtendedsupports parsing and writing JSON data that conforms to theJson.Extended.jsonjson type. This supports non-standard JSON types including integer as well as tuples and variants introduced byYojson.
module Extended_stream : sig ... endExtended_streamsupports parsing and writing JSON data that conforms to theJson_stream.Extended.jsontype as a stream ofJson_stream.Extended.jsonobjects. This supports non-standard JSON types including integer as well as tuples and variants introduced byYojson
module Extended_monad : sig ... endExtended_monadsupports parsing and writing JSON data that conforms to theJson.Extended.jsonjson 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 byYojson
module Strict : sig ... endStrictsupports parsing and writing JSON data that conforms to theJson.Strict.jsonjson 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
module Strict_stream : sig ... endStrict_streamsupports parsing and writing JSON data that conforms to theJson_stream.Strict.jsontype as a stream ofJson_stream.Strict.jsonobjects. This only supports types supported by the JSON standard and explicity excludes integers
module Strict_monad : sig ... endStrict_monadsupports parsing and writing JSON data that conforms to theJson.Strict.jsonjson type using reader and writer funtions that implement the IO monad. This only supports types supported by the JSON standard and explicity excludes integers
module Utilities : sig ... endjson tree conversion functions
module Error_info : sig ... endParsing error handling
module Yojson : sig ... endYojson compatibility module