oracle.dbtools.plugin.api.json

## Interface JSONToken

-     public interface JSONToken

  A token in a JSON character stream. `JSONToken` instances are produced by `JSONReader` (and can also be written to `JSONWriter` streams using the `JSONWriter.append(JSONToken)` method).
  Author:
    cdivilly
  See Also:
    `JSONToken.Type`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `JSONToken.Type` Enumerates the different kinds of tokens that occur in a JSON stream

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `booleanValue()` Returns the value of a property as a `Boolean` instance.
    `Number` | `numberValue()` Returns the value of a property as a `Number` instance.
    `String` | `propertyName()` Returns the name of a property.
    `String` | `stringValue()` Returns the value of a property as a `String`.
    `JSONToken.Type` | `type()` This token's type

- - ### Method Detail

    - #### booleanValue

          boolean booleanValue()

      Returns the value of a property as a `Boolean` instance. Only permissible on instances where `type()` == `JSONToken.Type.BOOLEAN_VALUE`.
      Returns:
        a boolean value

    - #### numberValue

          Number numberValue()

      Returns the value of a property as a `Number` instance. Only permissible on instances where `type()` == `JSONToken.Type.NUMERIC_VALUE`.
      Returns:
        a numeric value

    - #### propertyName

          String propertyName()

      Returns the name of a property. Only permissible on instances where `type()` == `JSONToken.Type.PROPERTY_NAME`.
      Returns:
        the property name

    - #### stringValue

          String stringValue()

      Returns the value of a property as a `String`. Only permissible on instsances where `type()` == `JSONToken.Type.STRING_VALUE`
      Returns:
        String value

    - #### type

          JSONToken.Type type()

      This token's type
      Returns:
        token type

Copyright © 2010, 2022, Oracle and/or its affiliates.