The JSONPrinter structure
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

The SML of NJ Library
The `JSONPrinter` structure

The `JSONPrinter` structure implements a printer for the `JSON.value` type.

## Synopsis

    structure JSONPrinter

## Interface

    val print : TextIO.outstream * JSON.value -> unit
    val print' : {strm : TextIO.outstream, pretty : bool} -> JSON.value -> unit

## Description

`val print : TextIO.outstream * JSON.value -> unit`

  `print (outS, jv)` prints the JSON value `jv` to the outstream `outS` in condensed format (i.e., without newlines or indentation).

`val print' : {strm : TextIO.outstream, pretty : bool} -> JSON.value -> unit`

  `print' {outS, pretty} jv` prints the JSON value `jv` to the outstream `outS`, where the value of the `pretty` field controls whether the output is condensed (when `pretty` is `false`) or printed with new lines and indentation to improve readability (when `pretty` is `true`).

## See Also

`JSON`, `JSONStreamPrinter`, The JSON Library

SML/NJ Version 110.99 (December 24, 2020)
Last updated 2020-04-12 22:11:25 UTC