public final class JavaTextJsonHandler extends AbstractAppendingJavaTextJsonHandler<StringBuilder,String>
JavaTextJsonHandler is a
AbstractAppendingJavaTextJsonHandler that calculates a text, that
mimics the Object.toString() behavior of Javas collection classes,
for the handled JSON document as a result.| Constructor and Description |
|---|
JavaTextJsonHandler()
Creates a new
JavaTextJsonHandler using the
default Indentation. |
JavaTextJsonHandler(Indentation indentation)
Creates a new
JavaTextJsonHandler. |
| Modifier and Type | Method and Description |
|---|---|
String |
getResult()
Returns the calculated result.
|
getAppendable, onArrayBegin, onArrayEnd, onBoolean, onDocumentBegin, onDocumentEnd, onDouble, onLong, onName, onNext, onNull, onObjectBegin, onObjectEnd, onStringcheckDouble, checkName, checkStringpublic JavaTextJsonHandler()
throws IllegalArgumentException
JavaTextJsonHandler using the
default Indentation.IllegalArgumentException - If the given Appendable is null.public JavaTextJsonHandler(Indentation indentation)
JavaTextJsonHandler.indentation - The Indentation to be used.IllegalArgumentException - If the given Appendable is null or if the
given Indentation is null.public String getResult() throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
getResult in interface JsonHandler<String>getResult in class IdleJsonHandler<String>JsonException - If the handling failed.Copyright © 2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.