public final class JsonTextJsonHandler extends AbstractAppendingJsonTextJsonHandler<StringBuilder,String>
JsonTextJsonHandler is a
AbstractAppendingJsonTextJsonHandler that calculates a pretty JSON
text for the handled JSON document as a result.| Constructor and Description |
|---|
JsonTextJsonHandler()
Creates a new
JsonTextJsonHandler using the
default Indentation. |
JsonTextJsonHandler(Indentation indentation)
Creates a new
JsonTextJsonHandler. |
| 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 JsonTextJsonHandler()
throws IllegalArgumentException
JsonTextJsonHandler using the
default Indentation.IllegalArgumentException - If the given Appendable is null.public JsonTextJsonHandler(Indentation indentation)
JsonTextJsonHandler.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.