JsArray

final case class JsArray(seq: Seq[JsValue]) extends IterableOnce[JsValue] with Json[JsArray]

represents an immutable Json array. There are several ways of creating a Json array, being the most common the following:

  • From a string, array of bytes or an input stream of bytes, using the parse functions of the companion object
  • From the apply function of the companion object:
Value parameters:
seq

immutable seq of JsValue

Companion:
object
trait Serializable
trait Product
trait Equals
trait Json[JsArray]
trait JsValue
trait IterableOnce[JsValue]
class Object
trait Matchable
class Any

Value members

Concrete methods

def appended(value: JsValue): JsArray
override def equals(that: Any): Boolean
Definition Classes
Equals -> Any
override def removed(path: JsPath): JsArray
Definition Classes
override def serialize(config: WriterConfig): Array[Byte]
Definition Classes
override def serialize(outputStream: OutputStream, config: WriterConfig): () => Unit
Definition Classes
override def toPrettyString(config: WriterConfig): String
Definition Classes
override def toString: String
Definition Classes
Json -> Any
override def updated(path: JsPath, value: JsValue, padWith: JsValue): JsArray
Definition Classes

Inherited methods

def appendedAll(xs: IterableOnce[JsValue]): JsArray
Inherited from:
AbstractJsArray (hidden)
@tailrec
final def apply(path: JsPath): JsValue

Returns the element located at a specified path. This function is total on its argument. If no element is found, JsNothing is returned

Returns the element located at a specified path. This function is total on its argument. If no element is found, JsNothing is returned

Value parameters:
path

the path

Returns:

the json value found at the path

Inherited from:
Json
def apply(i: Int): JsValue
Inherited from:
AbstractJsArray (hidden)
def filter(p: JsPrimitive => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
def filter(p: (JsPath, JsPrimitive) => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
def filterJsObj(p: JsObj => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
def filterJsObj(p: (JsPath, JsObj) => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
def filterKeys(p: String => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
def filterKeys(p: (JsPath, JsValue) => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
Inherited from:
AbstractJsArray (hidden)
def flatten: LazyList[(JsPath, JsValue)]
Returns:

a lazy list of pairs of path and json.value

Inherited from:
AbstractJsArray (hidden)
def getArray(path: JsPath): JsArray | Null
Inherited from:
Json
def getArray(path: JsPath, default: => JsArray): JsArray
Inherited from:
Json
def getArray(index: Int): JsArray | Null
Inherited from:
AbstractJsArray (hidden)
def getArray(index: Int, default: => JsArray): JsArray
Inherited from:
AbstractJsArray (hidden)
def getBigDec(path: JsPath): BigDecimal | Null
Inherited from:
Json
def getBigDec(path: JsPath, default: => BigDecimal): BigDecimal
Inherited from:
Json
def getBigDec(index: Int): BigDecimal | Null
Inherited from:
AbstractJsArray (hidden)
def getBigDec(index: Int, default: => BigDecimal): BigDecimal
Inherited from:
AbstractJsArray (hidden)
def getBigInt(path: JsPath): BigInt | Null
Inherited from:
Json
def getBigInt(path: JsPath, default: => BigInt): BigInt
Inherited from:
Json
def getBigInt(index: Int): BigInt | Null
Inherited from:
AbstractJsArray (hidden)
def getBigInt(index: Int, default: => BigInt): BigInt
Inherited from:
AbstractJsArray (hidden)
def getBool(path: JsPath): Boolean | Null
Inherited from:
Json
def getBool(path: JsPath, default: => Boolean): Boolean
Inherited from:
Json
def getBool(index: Int): Boolean | Null
Inherited from:
AbstractJsArray (hidden)
def getBool(index: Int, default: => Boolean): Boolean
Inherited from:
AbstractJsArray (hidden)
def getDouble(path: JsPath): Double | Null
Inherited from:
Json
def getDouble(path: JsPath, default: => Double): Double
Inherited from:
Json
def getDouble(index: Int): Double | Null
Inherited from:
AbstractJsArray (hidden)
def getDouble(index: Int, default: => Double): Double
Inherited from:
AbstractJsArray (hidden)
def getInt(path: JsPath): Int | Null
Inherited from:
Json
def getInt(path: JsPath, default: => Int): Int
Inherited from:
Json
def getInt(index: Int): Int | Null
Inherited from:
AbstractJsArray (hidden)
def getInt(index: Int, default: => Int): Int
Inherited from:
AbstractJsArray (hidden)
def getLong(path: JsPath): Long | Null
Inherited from:
Json
def getLong(path: JsPath, default: => Long): Long
Inherited from:
Json
def getLong(index: Int): Long | Null
Inherited from:
AbstractJsArray (hidden)
def getLong(index: Int, default: => Long): Long
Inherited from:
AbstractJsArray (hidden)
def getObj(path: JsPath): JsObj | Null
Inherited from:
Json
def getObj(path: JsPath, default: => JsObj): JsObj
Inherited from:
Json
def getObj(index: Int): JsObj | Null
Inherited from:
AbstractJsArray (hidden)
def getObj(index: Int, default: => JsObj): JsObj
Inherited from:
AbstractJsArray (hidden)
def getStr(path: JsPath): String | Null
Inherited from:
Json
def getStr(path: JsPath, default: => String): String
Inherited from:
Json
def getStr(index: Int): String | Null
Inherited from:
AbstractJsArray (hidden)
def getStr(index: Int, default: => String): String
Inherited from:
AbstractJsArray (hidden)
Inherited from:
AbstractJsArray (hidden)
Inherited from:
AbstractJsArray (hidden)
def isEmpty: Boolean
Inherited from:
AbstractJsArray (hidden)
def iterator: Iterator[JsValue]
Inherited from:
AbstractJsArray (hidden)
def knownSize: Int
Inherited from:
IterableOnce
Inherited from:
AbstractJsArray (hidden)
def length(): Int
Inherited from:
AbstractJsArray (hidden)
Inherited from:
AbstractJsArray (hidden)
def map(m: (JsPath, JsPrimitive) => JsValue, p: (JsPath, JsPrimitive) => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
def mapKeys(m: String => String): JsArray
Inherited from:
AbstractJsArray (hidden)
def mapKeys(m: (JsPath, JsValue) => String, p: (JsPath, JsValue) => Boolean): JsArray
Inherited from:
AbstractJsArray (hidden)
final def nonEmpty: Boolean

returns true if the Json is non empty

returns true if the Json is non empty

Returns:

true if non empty, false otherwise

Inherited from:
Json
def prependedAll(xs: IterableOnce[JsValue]): JsArray
Inherited from:
AbstractJsArray (hidden)
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def reduce[V](p: (JsPath, JsPrimitive) => Boolean, m: (JsPath, JsPrimitive) => V, r: (V, V) => V): Option[V]
Inherited from:
AbstractJsArray (hidden)
def serialize(outputStream: OutputStream): () => Unit

Returns a zero-argument function that when called, it serializes this Json into the given output stream, no returning anything

Returns a zero-argument function that when called, it serializes this Json into the given output stream, no returning anything

Value parameters:
outputStream

the output stream

Returns:

() => Unit function that serializes this Json into the given output stream

Inherited from:
Json
def size: Int
Inherited from:
AbstractJsArray (hidden)
def stepper[S <: Stepper[_]](implicit shape: StepperShape[JsValue, S]): S
Inherited from:
IterableOnce
Inherited from:
AbstractJsArray (hidden)