Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JsonEvent

A JSON event emited by the JsonParser.

Hierarchy

  • JsonEvent

Index

Methods

arrayValue

  • arrayValue(): any[]
  • Returns any[]

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 Buffer

booleanValue

  • booleanValue(): boolean
  • Returns boolean

doubleValue

  • doubleValue(): number
  • Returns number

fieldName

  • fieldName(): string
  • Returns string

floatValue

  • floatValue(): number
  • Returns number

instantValue

  • instantValue(): Date
  • 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 Date

integerValue

  • integerValue(): number
  • Returns number

isArray

  • isArray(): boolean
  • Returns boolean

isBoolean

  • isBoolean(): boolean
  • Returns boolean

isNull

  • isNull(): boolean
  • Returns boolean

isNumber

  • isNumber(): boolean
  • Returns boolean

isObject

  • isObject(): boolean
  • Returns boolean

isString

  • isString(): boolean
  • Returns boolean

longValue

  • longValue(): number
  • Returns number

mapTo

  • mapTo<T>(type: any): T
  • mapTo<T>(type: any): T
  • Decodes and returns the current value as the specified type.

    Type parameters

    • T

    Parameters

    • type: any

    Returns T

  • Decodes and returns the current value as the specified type.

    Type parameters

    • T

    Parameters

    • type: any

    Returns T

objectValue

  • objectValue(): {}
  • Returns {}

    • [key: string]: any

stringValue

  • stringValue(): string
  • Returns string

type

  • Returns JsonEventType

value

  • value(): any
  • Returns any

Generated using TypeDoc