org.h2.util.json

## Class JSONArray

- java.lang.Object
- - org.h2.util.json.JSONValue
  - - org.h2.util.json.JSONArray

    public final class JSONArray
    extends JSONValue

JSON array.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addTo(JSONTarget<?> target)` Appends this value to the specified target.
`JSONValue[]` `getArray()` Returns the value.
`<E> E[]` `getArray(java.lang.Class<E> elementType, java.util.function.Function<JSONValue,E> converter)` Returns the value.
`JSONValue` `getElement(int index)` Returns the value at specified 0-based index, or `null`.
`int` `length()` Returns the array length

### Methods inherited from class org.h2.util.json.JSONValue

`toString`

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

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

### Method Detail

#### addTo

    public void addTo(JSONTarget<?> target)

Description copied from class: `JSONValue`
Appends this value to the specified target.

Specified by:
  `addTo` in class `JSONValue`
Parameters:
  `target` - the target

#### length

    public int length()

Returns the array length

Returns:
  the array length

#### getArray

    public JSONValue[] getArray()

Returns the value.

Returns:
  the value

#### getArray

    public <E> E[] getArray(java.lang.Class<E> elementType,
                            java.util.function.Function<JSONValue,E> converter)

Returns the value.

Type Parameters:
  `E` - type of elements
Parameters:
  `elementType` - the type of array elements
  `converter` - a converter to the specified type
Returns:
  the value

#### getElement

    public JSONValue getElement(int index)

Returns the value at specified 0-based index, or `null`.

Parameters:
  `index` - 0-based index
Returns:
  the value at specified 0-based index, or `null`.