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`, `JSON_STREAM_OUTPUT`, The JSON Library

SML/NJ Version 110.99.3 (August 1, 2023)
Last updated 2023-07-31 17:59:01 UTC