oracle.dbtools.plugin.api.json.objects

## Interface JSONObject.Builder

- All Superinterfaces:
    JSONNode.Builder
  Enclosing interface:
    JSONObject

      public static interface JSONObject.Builder
      extends JSONNode.Builder

  Build `JSONObject` instances
  Author:
    cdivilly
  See Also:
    `JSONObjects.object()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `JSONObject.Builder` | `add(JSONObject existing)` Add all the properties in the existing `JSONObject` to this object.
    `JSONObject.Builder` | `add(String propertyName, Boolean value)` Add a boolean JSON property
    `JSONObject.Builder` | `add(String propertyName, CharSequence value)` Add a String JSON property
    `JSONObject.Builder` | `add(String propertyName, JSONNode value)` Add a JSON property containing another JSON document
    `JSONObject.Builder` | `add(String propertyName, Number value)` Create a numeric JSON property
    `JSONObject.Builder` | `add(String propertyName, Object value)` Add a property.
    `JSONObject.Builder` | `addNull(String propertyName)` Add a null property
    `JSONObject` | `build()` Build the `JSONNode` instance
    `JSONObject.Builder` | `remove(String propertyName)` Remove the named property

- - ### Method Detail

    - #### add

          JSONObject.Builder add(JSONObject existing)

      Add all the properties in the existing `JSONObject` to this object.
      Parameters:
        `existing` - The `JSONObject` containing properties to be added
      Returns:
        self

    - #### add

          JSONObject.Builder add(String propertyName,
                                 Object value)

      Add a property.
      Parameters:
        `propertyName` - The name of the property
        `value` - The value to add, must be an instance of one of the types specified here.
      Returns:
        self

    - #### add

          JSONObject.Builder add(String propertyName,
                                 Boolean value)

      Add a boolean JSON property
      Parameters:
        `propertyName` - property name
        `value` - property value
      Returns:
        self

    - #### add

          JSONObject.Builder add(String propertyName,
                                 CharSequence value)

      Add a String JSON property
      Parameters:
        `propertyName` - property name
        `value` - property value
      Returns:
        self

    - #### add

          JSONObject.Builder add(String propertyName,
                                 JSONNode value)

      Add a JSON property containing another JSON document
      Parameters:
        `propertyName` - property name
        `value` - property value
      Returns:
        self

    - #### add

          JSONObject.Builder add(String propertyName,
                                 Number value)

      Create a numeric JSON property
      Parameters:
        `propertyName` - property name
        `value` - property value
      Returns:
        self

    - #### addNull

          JSONObject.Builder addNull(String propertyName)

      Add a null property
      Parameters:
        `propertyName` - property name
      Returns:
        self

    - #### remove

          JSONObject.Builder remove(String propertyName)

      Remove the named property
      Parameters:
        `propertyName` - The name of the property to remove
      Returns:
        self

    - #### build

          JSONObject build()

      Description copied from interface: `JSONNode.Builder`
      Build the `JSONNode` instance
      Specified by:
        `build` in interface `JSONNode.Builder`
      Returns:
        `JSONNode` instance

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