JsArray

play.api.libs.json.JsArray
See theJsArray companion object
case class JsArray(value: IndexedSeq[JsValue]) extends JsValue

Represent a Json array value.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait JsValue
trait JsReadable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def ++(other: JsArray): JsArray

Concatenates this array with the elements of an other array.

Concatenates this array with the elements of an other array.

Attributes

def +:(el: JsValue): JsArray

Prepend an element to this array.

Prepend an element to this array.

Attributes

def :+(el: JsValue): JsArray

Append an element to this array.

Append an element to this array.

Attributes

def append(el: JsValue): JsArray
def prepend(el: JsValue): JsArray

Inherited methods

def as[T](implicit fjs: Reads[T]): T

Tries to convert the node into a T, throwing an exception if it can't. An implicit Reads[T] must be defined.

Tries to convert the node into a T, throwing an exception if it can't. An implicit Reads[T] must be defined.

Attributes

Inherited from:
JsReadable
def asOpt[T](implicit fjs: Reads[T]): Option[T]

Tries to convert the node into a T. An implicit Reads[T] must be defined. Any error is mapped to None

Tries to convert the node into a T. An implicit Reads[T] must be defined. Any error is mapped to None

Attributes

Returns

Some[T] if it succeeds, None if it fails.

Inherited from:
JsReadable
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
JsValue -> Any
Inherited from:
JsValue
def transform[A <: JsValue](rds: Reads[A]): JsResult[A]

Transforms this node into a JsResult using provided Json transformer Reads[JsValue]

Transforms this node into a JsResult using provided Json transformer Reads[JsValue]

Attributes

Inherited from:
JsReadable
def validate[A](implicit rds: Reads[A]): JsResult[A]

Tries to convert the node into a JsResult[T] (Success or Error). An implicit Reads[T] must be defined.

Tries to convert the node into a JsResult[T] (Success or Error). An implicit Reads[T] must be defined.

Attributes

Inherited from:
JsValue
def validateOpt[A](implicit rds: Reads[A]): JsResult[Option[A]]

Attributes

Inherited from:
JsValue