JsonArray

trait JsonArray extends JsonStructure

Defines JSON array.

See also
Companion
object
trait JsonValue
class Object
trait Matchable
class Any

Value members

Abstract methods

@targetName("concat")
def ++(suffix: JsonArray): JsonArray

Concatenates JSON array.

Concatenates JSON array.

Returns

new JSON array

@targetName("prepend")
def +:(value: JsonValue): JsonArray

Prepends value.

Prepends value.

Returns

new JSON array

@targetName("append")
def :+(value: JsonValue): JsonArray

Appends value.

Appends value.

Returns

new JSON array

def apply(index: Int): JsonValue

Gets value at given index.

Gets value at given index.

def values: Seq[JsonValue]

Gets values.

Gets values.

Concrete methods

def getArray(index: Int): JsonArray

Gets array value at given index.

Gets array value at given index.

Throws
ClassCastException

if not JsonArray

def getBoolean(index: Int): JsonBoolean

Gets boolean value at given index.

Gets boolean value at given index.

Throws
ClassCastException

if not JsonBoolean

def getNull(index: Int): JsonNull

Gets null value at given index.

Gets null value at given index.

Throws
ClassCastException

if not JsonNull

def getNumber(index: Int): JsonNumber

Gets number value at given index.

Gets number value at given index.

Throws
ClassCastException

if not JsonNumber

def getObject(index: Int): JsonObject

Gets object value at given index.

Gets object value at given index.

Throws
ClassCastException

if not JsonObject

def getString(index: Int): JsonString

Gets string value at given index.

Gets string value at given index.

Throws
ClassCastException

if not JsonString

Inherited methods

final def as[T](using convert: JsonInput[T]): T

Converts value.

Converts value.

Inherited from
JsonValue
def isEmpty: Boolean

Tests for emptiness.

Tests for emptiness.

Inherited from
JsonStructure
def size: Int

Gets size.

Gets size.

Inherited from
JsonStructure