vertx / io.vertx.core.parsetools / JsonEvent

JsonEvent

interface JsonEvent

A JSON event emited by the JsonParser.

Author
Julien Viet

Functions

arrayValue

abstract fun arrayValue(): JsonArray

binaryValue

abstract fun binaryValue(): Buffer

Return the binary value.

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.

booleanValue

abstract fun booleanValue(): Boolean

doubleValue

abstract fun doubleValue(): Double

fieldName

abstract fun fieldName(): String

floatValue

abstract fun floatValue(): Float

instantValue

abstract fun instantValue(): Instant

Return the 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.

integerValue

abstract fun integerValue(): Int

isArray

abstract fun isArray(): Boolean

isBoolean

abstract fun isBoolean(): Boolean

isNull

abstract fun isNull(): Boolean

isNumber

abstract fun isNumber(): Boolean

isObject

abstract fun isObject(): Boolean

isString

abstract fun isString(): Boolean

longValue

abstract fun longValue(): Long

mapTo

abstract fun <T : Any> mapTo(type: Class<T>): T
abstract fun <T : Any> mapTo(type: TypeReference<T>): T

Decodes and returns the current value as the specified type.

objectValue

abstract fun objectValue(): JsonObject

stringValue

abstract fun stringValue(): String

type

abstract fun type(): JsonEventType

value

abstract fun value(): Any