Result - The result type.public interface JsonHandler<Result>
JsonHandler provides a collection of callback methods that can be
called to describe a JSON document and calculates a result for the described
JSON document.| Modifier and Type | Method and Description |
|---|---|
Result |
getResult()
Returns the calculated result.
|
void |
onArrayBegin()
Called when the parsing of a JSON array started.
|
void |
onArrayEnd()
Called when the parsing of a JSON array ended.
|
void |
onBoolean(boolean value)
Called when the parsing of a JSON object encountered a JSON boolean.
|
void |
onDocumentBegin()
Called when the parsing of a JSON document started.
|
void |
onDocumentEnd()
Called when the parsing of a JSON document ended.
|
void |
onDouble(double value)
Called when the parsing of a JSON object encountered a JSON number, that
represents a decimal value.
|
void |
onLong(long value)
Called when the parsing of a JSON object encountered a JSON number, that
represents an integer value.
|
void |
onName(String name)
Called when the parsing of a JSON object encountered the name for the
next JSON value.
|
void |
onNext()
Called when the parsing of a JSON array or JSON object encountered
another element.
|
void |
onNull()
Called when the parsing of a JSON object encountered a JSON null.
|
void |
onObjectBegin()
Called when the parsing of a JSON object started.
|
void |
onObjectEnd()
Called when the parsing of a JSON object ended.
|
void |
onString(String value)
Called when the parsing of a JSON object encountered a JSON string.
|
void onDocumentBegin()
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onDocumentEnd()
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onArrayBegin()
throws JsonHandlingException
end must eventually be called.
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onArrayEnd()
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onObjectBegin()
throws JsonHandlingException
end must eventually be called.
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onObjectEnd()
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onName(String name) throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
name - The name for the next JSON value.JsonHandlingException - If the handling failed.void onNext()
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onNull()
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.void onBoolean(boolean value)
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
value - The value of the JSON boolean.JsonHandlingException - If the handling failed.void onLong(long value)
throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
value - The value of the JSON number.JsonHandlingException - If the handling failed.void onDouble(double value)
throws InvalidJsonValueException,
JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
value - The value of the JSON number.InvalidJsonValueException - If the given value is not a
number or infinite.JsonHandlingException - If the handling failed.void onString(String value) throws InvalidJsonValueException, JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
value - The value of the JSON string.InvalidJsonValueException - If the given value is null.JsonHandlingException - If the handling failed.Result getResult() throws JsonHandlingException
Implementers should catch any exception and wrap them in a
JsonHandlingException.
JsonHandlingException - If the handling failed.Copyright © 2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.