public interface JsonEvent
JsonParser.| Modifier and Type | Method and Description |
|---|---|
JsonArray |
arrayValue() |
Buffer |
binaryValue()
Return the binary value.
|
Boolean |
booleanValue() |
Double |
doubleValue() |
String |
fieldName() |
Float |
floatValue() |
java.time.Instant |
instantValue()
Return the
Instant value. |
Integer |
integerValue() |
boolean |
isArray() |
boolean |
isBoolean() |
boolean |
isNull() |
boolean |
isNumber() |
boolean |
isObject() |
boolean |
isString() |
Long |
longValue() |
<T> T |
mapTo(Class<T> type)
Decodes and returns the current value as the specified
type. |
<T> T |
mapTo(TypeReference<T> type)
Decodes and returns the current value as the specified
type. |
JsonObject |
objectValue() |
String |
stringValue() |
JsonEventType |
type() |
Object |
value() |
JsonEventType type()
String fieldName()
Object value()
JsonEventType.VALUE eventsboolean isNumber()
Integer integerValue()
Integer value or null if the event has no JSON valueClassCastException - if the value is not an IntegerLong longValue()
Long value or null if the event has no JSON valueClassCastException - if the value is not a LongFloat floatValue()
Float value or null if the event has no JSON valueClassCastException - if the value is not a FloatDouble doubleValue()
Double value or null if the event has no JSON valueClassCastException - if the value is not a Doubleboolean isBoolean()
Boolean booleanValue()
Boolean value or null if the event has no JSON valueClassCastException - if the value is not a Booleanboolean isString()
String stringValue()
null if the event has no JSON valueClassCastException - if the value is not a stringBuffer binaryValue()
JSON itself has no notion of a binary, this extension complies to the RFC-7493, so this method assumes there is a String value with the key and it contains a Base64 encoded binary, which it decodes if found and returns.
null if the event has no JSON valueClassCastException - if the value is not a StringIllegalArgumentException - if the String value is not a legal Base64 encoded valuejava.time.Instant instantValue()
Instant value.
JSON itself has no notion of a temporal types, this extension complies to the RFC-7493, so this method assumes there is a String value with the key and it contains an ISO 8601 encoded date and time format such as "2017-04-03T10:25:41Z", which it decodes if found and returns.
Instant value or null if the event has no JSON valueClassCastException - if the value is not a Stringjava.time.format.DateTimeParseException - if the String value is not a legal ISO 8601 encoded valueboolean isNull()
boolean isObject()
JsonObject objectValue()
null if the event has no JSON valueClassCastException - if the value is not a JSON objectboolean isArray()
JsonArray arrayValue()
null if the event has no JSON valueClassCastException - if the value is not a JSON array<T> T mapTo(Class<T> type)
type.type - the type to decode the value to<T> T mapTo(TypeReference<T> type)
type.type - the type to decode the value toCopyright © 2022 Eclipse. All rights reserved.