JsonList

An immutable list of JsonValues.

Constructors

Link copied to clipboard
constructor(list: List<JsonValue>?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns whether this List contains no elements.

Link copied to clipboard

Gets the JsonList as a List.

Functions

Link copied to clipboard
fun contains(jsonValue: JsonValue): Boolean

Tests whether this List contains the specified JSON value.

Link copied to clipboard
open operator override fun equals(object: Any?): Boolean
Link copied to clipboard
operator fun get(location: Int): JsonValue

Returns the element at the specified location in this List.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun indexOf(jsonValue: JsonValue): Int

Searches this List for the specified object and returns the index of the first occurrence.

Link copied to clipboard
open operator override fun iterator(): MutableIterator<JsonValue>

Returns an iterator on the elements of this List. The elements are iterated in the same order as they occur in the List.

Link copied to clipboard
fun lastIndexOf(jsonValue: JsonValue): Int

Searches this List for the specified object and returns the index of the first occurrence.

Link copied to clipboard
fun size(): Int

Returns the number of elements in this List.

Link copied to clipboard
open override fun toJsonValue(): JsonValue

Returns the objects represented as a JsonValue.

Link copied to clipboard
open override fun toString(): String

Returns the JsonList as a JSON encoded String.

Link copied to clipboard
fun write(stringer: JSONStringer, sortKeys: Boolean)

Helper method that is used to write the list as a JSON String.