Interface JsonArray


public interface JsonArray
Represents a JSON array.
  • Method Summary

    Modifier and Type
    Method
    Description
    Formats the array as a String.
    int
    Retrieves the number of elements in the array.
    <T> T
    getValue(int index, JsonValueType<T> valueType)
    Retrieves a value contained at the given index.
  • Method Details

    • getValue

      <T> T getValue(int index, JsonValueType<T> valueType)
      Retrieves a value contained at the given index.

      Throws an exception if the value contained at the given index does not match the requested type.

      Type Parameters:
      T - the requested value type
      Parameters:
      index - the index of the element. Cannot be negative or greater than/equal to the number of rows.
      valueType - the requested value type. Cannot be null.
      Returns:
      a node at the specified index
    • getSize

      int getSize()
      Retrieves the number of elements in the array.
      Returns:
      the number of elements in the array
    • asString

      String asString()
      Formats the array as a String.
      Returns:
      the array as a String