Package oracle.dbtools.plugin.api.json.objects

## Interface JSONObjects

-     public interface JSONObjects

  API for creating in memory JSON Object representations, and for serializing in memory Object Graphs to JSON representations.
  Author:
    cdivilly

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `JSONArray.Builder` | `array()` | Create a new `JSONArray.Builder` instance
    `JSONObject.Builder` | `object()` | Create a new `JSONObject.Builder` instance
    `JSONNode` | `read​(java.io.InputStream stream)` | Parse a byte stream into a `JSONObject` or `JSONArray` instance
    `JSONNode` | `read​(java.io.Reader stream)` | Parse a character stream into a `JSONObject` or `JSONArray` instance
    `JSONNode` | `read​(java.lang.CharSequence text)` | Parse a character stream into a `JSONObject` or `JSONArray` instance
    `JSONNode` | `read​(java.util.Iterator<JSONToken> stream)` | Parse a JSONToken stream into a `JSONObject` or `JSONArray` instance
    `void` | `write​(java.io.OutputStream stream, java.lang.Object objectGraph)` | Serialize any Java Object graph to it's textual representation.
    `void` | `write​(java.io.OutputStream stream, JSONNode node)` | Serialize a JSON Object graph to it's textual representation
    `void` | `write​(java.lang.Appendable stream, java.lang.Object objectGraph)` | Serialize any Java Object graph to it's textual representation.
    `void` | `write​(java.lang.Appendable stream, JSONNode node)` | Serialize a JSON Object graph to it's textual representation
    `void` | `write​(JSONWriter stream, java.lang.Object objectGraph)` | Serialize any Java Object graph to a `JSONWriter` stream.
    `void` | `write​(JSONWriter stream, JSONNode node)` | Serialize a JSON Object graph to a `JSONWriter` stream

- - ### Method Detail

    - #### array

          JSONArray.Builder array()

      Create a new `JSONArray.Builder` instance
      Returns:
        `JSONArray.Builder` instance

    - #### object

          JSONObject.Builder object()

      Create a new `JSONObject.Builder` instance
      Returns:
        `JSONObject.Builder` instance

    - #### read

          JSONNode read​(java.lang.CharSequence text)

      Parse a character stream into a `JSONObject` or `JSONArray` instance
      Parameters:
        `text` - The JSON textual representation to be parsed
      Returns:
        `JSONObject` or `JSONArray` instance

    - #### read

          JSONNode read​(java.io.InputStream stream)
                 throws JSONIOException

      Parse a byte stream into a `JSONObject` or `JSONArray` instance
      Parameters:
        `stream` - The JSON textual representation to be parsed
      Returns:
        `JSONObject` or `JSONArray` instance
      Throws:
        `JSONIOException` - if an `IOException` occurs reading from the stream

    - #### read

          JSONNode read​(java.util.Iterator<JSONToken> stream)
                 throws JSONIOException

      Parse a JSONToken stream into a `JSONObject` or `JSONArray` instance
      Parameters:
        `stream` - The `JSONToken` stream to be parsed
      Returns:
        `JSONObject` or `JSONArray` instance
      Throws:
        `JSONIOException` - if an `IOException` occurs reading from the stream

    - #### read

          JSONNode read​(java.io.Reader stream)
                 throws JSONIOException

      Parse a character stream into a `JSONObject` or `JSONArray` instance
      Parameters:
        `stream` - The JSON textual representation to be parsed
      Returns:
        `JSONObject` or `JSONArray` instance if an `IOException` occurs reading from the stream
      Throws:
        `JSONIOException`

    - #### write

          void write​(java.lang.Appendable stream,
                     JSONNode node)
              throws JSONIOException

      Serialize a JSON Object graph to it's textual representation
      Parameters:
        `stream` - The character stream to serialize to
        `node` - The `JSONObject` or `JSONNode` at the root of the object graph
      Throws:
        `JSONIOException` - if an IO error occurs

    - #### write

          void write​(java.lang.Appendable stream,
                     java.lang.Object objectGraph)
              throws JSONIOException

      Serialize any Java Object graph to it's textual representation.

      Parameters:
        `stream` - The character stream to serialize to
        `objectGraph` - The root node in the object graph
      Throws:
        `JSONIOException` - if an IO error occurs
      See Also:
        Serializing Java Object Graphs

    - #### write

          void write​(JSONWriter stream,
                     JSONNode node)
              throws JSONIOException

      Serialize a JSON Object graph to a `JSONWriter` stream
      Parameters:
        `stream` - The `JSONWriter` stream to serialize to
        `node` - The `JSONObject` or `JSONNode` at the root of the object graph
      Throws:
        `JSONIOException` - if an IO error occurs

    - #### write

          void write​(JSONWriter stream,
                     java.lang.Object objectGraph)
              throws JSONIOException

      Serialize any Java Object graph to a `JSONWriter` stream.

      Parameters:
        `stream` - The `JSONWriter` stream to serialize to
        `objectGraph` - The root node in the object graph
      Throws:
        `JSONIOException` - if an IO error occurs
      See Also:
        Serializing Java Object Graphs

    - #### write

          void write​(java.io.OutputStream stream,
                     JSONNode node)
              throws JSONIOException

      Serialize a JSON Object graph to it's textual representation
      Parameters:
        `stream` - The byte stream to serialize to
        `node` - The `JSONObject` or `JSONNode` at the root of the object graph
      Throws:
        `JSONIOException` - if an IO error occurs

    - #### write

          void write​(java.io.OutputStream stream,
                     java.lang.Object objectGraph)
              throws JSONIOException

      Serialize any Java Object graph to it's textual representation.

      Parameters:
        `stream` - The byte stream to serialize to
        `objectGraph` - The root node in the object graph
      Throws:
        `JSONIOException` - if an IO error occurs
      See Also:
        Serializing Java Object Graphs