case class JsObject(underlying: Map[String, JsValue]) extends JsValue with Product with Serializable
- Alphabetic
- By Inheritance
- JsObject
- Serializable
- Product
- Equals
- JsValue
- JsReadable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def +(otherField: (String, JsValue)): JsObject
Adds one field to the JsObject
- def ++(other: JsObject): JsObject
Merge this object with another one.
Merge this object with another one. Values from other override value of the current object.
- def -(otherField: String): JsObject
Removes one field from the JsObject
- def as[T](implicit fjs: Reads[T]): T
Tries to convert the node into a T, throwing an exception if it can't.
Tries to convert the node into a T, throwing an exception if it can't. An implicit Reads[T] must be defined.
- Definition Classes
- JsReadable
- def asOpt[T](implicit fjs: Reads[T]): Option[T]
Tries to convert the node into a T.
Tries to convert the node into a T. An implicit Reads[T] must be defined. Any error is mapped to None
- returns
Some[T] if it succeeds, None if it fails.
- Definition Classes
- JsReadable
- def canEqual(other: Any): Boolean
- Definition Classes
- JsObject → Equals
- def deepMerge(other: JsObject): JsObject
merges everything in depth and doesn't stop at first level, as ++ does
- def equals(other: Any): Boolean
- Definition Classes
- JsObject → Equals → AnyRef → Any
- def fieldSet: Set[(String, JsValue)]
Return all fields as a set
- def fields: Seq[(String, JsValue)]
The fields of this JsObject in the order passed to the constructor
- def hashCode(): Int
- Definition Classes
- JsObject → AnyRef → Any
- def keys: Set[String]
Return all keys
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def toString(): String
- Definition Classes
- JsValue → AnyRef → Any
- 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]
- Definition Classes
- JsReadable
- def validate[A](implicit rds: Reads[A]): JsResult[A]
Tries to convert the node into a JsResult[T] (Success or Error).
Tries to convert the node into a JsResult[T] (Success or Error). An implicit Reads[T] must be defined.
- Definition Classes
- → JsReadable
- def validateOpt[A](implicit rds: Reads[A]): JsResult[Option[A]]
- Definition Classes
- JsValue
- def value: Map[String, JsValue]
The value of this JsObject as an immutable map.
- def values: Iterable[JsValue]
Return all values
Represent a Json object value.