JsonArray

class JsonArray(content: List<JsonElement>) : JsonElement, List<JsonElement>

Class representing JSON array, consisting of indexed values, where value is arbitrary JsonElement

Since this class also implements List interface, you can use traditional methods like List.get or List.getOrNull to obtain Json elements.

Constructors

Link copied to clipboard
fun JsonArray(content: List<JsonElement>)

Functions

Link copied to clipboard
open operator override fun contains(element: JsonElement): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<JsonElement>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(index: Int): JsonElement
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun indexOf(element: JsonElement): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<JsonElement>
Link copied to clipboard
open override fun lastIndexOf(element: JsonElement): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<JsonElement>
open override fun listIterator(index: Int): ListIterator<JsonElement>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<JsonElement>
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open override val size: Int