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 valuejv
to the outstreamoutS
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 valuejv
to the outstreamoutS
, where the value of thepretty
field controls whether the output is condensed (whenpretty
isfalse
) or printed with new lines and indentation to improve readability (whenpretty
istrue
).