Type Hierarchy:
Direct Known Subclasses: StringPrinter

A JSON Printer

By: Stéphane Épardaud
Initializer
Printer(Boolean pretty = false)
Parameters:
  • pretty = false
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
print
shared formal void print(String string)

Override to implement the printing part

printArray
shared default void printArray(Array o)

Prints an Array

printBoolean
shared default void printBoolean(Boolean v)

Prints a Boolean

printNull
shared default void printNull()

Prints null

printNumber
shared default void printNumber(Number n)

Prints an Integer|Float

printObject
shared default void printObject(Object o)

Prints an Object

printString
shared default void printString(String s)

Prints a String

printValue
shared default void printValue(String|Boolean|Integer|Float|Object|Array|NullInstance val)

Prints a JSON value

Inherited Methods
Methods inherited from: Object
equals