The JSON Library


The JSON Library provides a representation of the JavaScript Object Notation (JSON) with support for parsing, printing, and manipulating JSON values as trees. There is also support for processing JSON data as streams using a "SAX-style" API.


Tree-based API

structure JSON

Defines the representation of JSON values as an SML datatype.

structure JSONParser

A parser for JSON input.

structure JSONPrinter

A printer for JSON output.

structure JSONUtil

A collection of utility functions for working with JSON values.

Stream-based API

structure JSONStreamParser

A stream (or event) based parser for JSON input.

structure JSONStreamPrinter

A stream based printer for JSON input.


For SML/NJ, include $/ in your CM file.

For use in MLton, include $(SML_LIB)/smlnj-lib/JSON/ in your MLB file.