io.vertx.reactivex.core.parsetools

## Class JsonEvent

- java.lang.Object
- - io.vertx.reactivex.core.parsetools.JsonEvent

-     public class JsonEvent
      extends Object

  A JSON event emited by the `JsonParser`.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<JsonEvent>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonEvent(JsonEvent delegate)`
    `JsonEvent(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonArray` | `arrayValue()`
    `Buffer` | `binaryValue()` Return the binary value.
    `Boolean` | `booleanValue()`
    `Double` | `doubleValue()`
    `boolean` | `equals(Object o)`
    `String` | `fieldName()`
    `Float` | `floatValue()`
    `JsonEvent` | `getDelegate()`
    `int` | `hashCode()`
    `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`.
    `static JsonEvent` | `newInstance(JsonEvent arg)`
    `JsonObject` | `objectValue()`
    `String` | `stringValue()`
    `String` | `toString()`
    `JsonEventType` | `type()`
    `Object` | `value()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<JsonEvent> __TYPE_ARG

  - ### Constructor Detail

    - #### JsonEvent

          public JsonEvent(JsonEvent delegate)

    - #### JsonEvent

          public JsonEvent(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public JsonEvent getDelegate()

    - #### type

          public JsonEventType type()

      Returns:
        the type of the event

    - #### fieldName

          public String fieldName()

      Returns:
        the name of the field when the event is emitted as a JSON object member

    - #### value

          public Object value()

      Returns:
        the json value for events

    - #### isNumber

          public boolean isNumber()

      Returns:
        true when the JSON value is a number

    - #### integerValue

          public Integer integerValue()

      Returns:
        the `Integer` value or `null` if the event has no JSON value

    - #### longValue

          public Long longValue()

      Returns:
        the `Long` value or `null` if the event has no JSON value

    - #### floatValue

          public Float floatValue()

      Returns:
        the `Float` value or `null` if the event has no JSON value

    - #### doubleValue

          public Double doubleValue()

      Returns:
        the `Double` value or `null` if the event has no JSON value

    - #### isBoolean

          public boolean isBoolean()

      Returns:
        true when the JSON value is a boolean

    - #### booleanValue

          public Boolean booleanValue()

      Returns:
        the `Boolean` value or `null` if the event has no JSON value

    - #### isString

          public boolean isString()

      Returns:
        true when the JSON value is a string

    - #### stringValue

          public String stringValue()

      Returns:
        the string value or `null` if the event has no JSON value

    - #### binaryValue

          public Buffer binaryValue()

      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.

      Returns:
        the binary value or `null` if the event has no JSON value

    - #### isNull

          public boolean isNull()

      Returns:
        true when the JSON value is null

    - #### isObject

          public boolean isObject()

      Returns:
        true when the JSON value is a JSON object

    - #### objectValue

          public JsonObject objectValue()

      Returns:
        the JSON object value or `null` if the event has no JSON value

    - #### isArray

          public boolean isArray()

      Returns:
        true when the JSON value is a JSON array

    - #### arrayValue

          public JsonArray arrayValue()

      Returns:
        the JSON array value or `null` if the event has no JSON value

    - #### mapTo

          public <T> T mapTo(Class<T> type)

      Decodes and returns the current value as the specified `type`.
      Parameters:
        `type` - the type to decode the value to
      Returns:
        the decoded value

    - #### instantValue

          public java.time.Instant instantValue()

      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.

      Returns:
        the `Instant` value or `null` if the event has no JSON value

    - #### mapTo

          public <T> T mapTo(TypeReference<T> type)

      Decodes and returns the current value as the specified `type`.
      Parameters:
        `type` - the type to decode the value to
      Returns:
        the decoded value

    - #### newInstance

          public static JsonEvent newInstance(JsonEvent arg)

Copyright © 2022 Eclipse. All rights reserved.