Result - The result type.public interface JsonHandler<Result>
JsonHandler provides a collection of callback methods that can be
called for a sequence of events that describe a JSON document. A
JsonHandler can calculate 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 JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onDocumentEnd()
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onArrayBegin()
throws JsonException
end must eventually be called.
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onArrayEnd()
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onObjectBegin()
throws JsonException
end must eventually be called.
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onObjectEnd()
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onName(String name) throws JsonIndexException, JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
name - The name for the next JSON value.JsonIndexException - If the given value is null.JsonException - If the handling failed.void onNext()
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onNull()
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.void onBoolean(boolean value)
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
value - The value of the JSON boolean.JsonException - If the handling failed.void onLong(long value)
throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
value - The value of the JSON number.JsonException - If the handling failed.void onDouble(double value)
throws JsonValueException,
JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
value - The value of the JSON number.JsonValueException - If the given value is not a
number or infinite.JsonException - If the handling failed.void onString(String value) throws JsonValueException, JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
value - The value of the JSON string.JsonValueException - If the given value is null.JsonException - If the handling failed.Result getResult() throws JsonException
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
JsonException - If the handling failed.Copyright © 2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.