trait ReadLens[M[_]] extends AnyRef
The read lens can extract child values out of a JsValue hierarchy. A read lens is parameterized with a type constructor. This allows to extracts not only scalar values but also sequences or optional values.
- Alphabetic
- By Inheritance
- ReadLens
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
get[T](value: JsValue)(implicit arg0: Reader[T]): M[T]
Given a parent JsValue extracts and converts a JsValue into a value of type
Tor throws an exception. -
abstract
def
is[U](f: (U) ⇒ Boolean)(implicit arg0: Reader[U]): JsPred
Lifts a predicate for a converted value for this lens up to the parent level.
Lifts a predicate for a converted value for this lens up to the parent level. The returned predicate will return false for values which fail to read.
-
abstract
def
retr: (JsValue) ⇒ Validated[M[JsValue]]
Given a parent JsValue, tries to extract the child value.
Given a parent JsValue, tries to extract the child value.
- returns
Right(value)if the lens read succeeds.Left(error)if the lens read fails.
-
abstract
def
tryGet[T](value: JsValue)(implicit arg0: Reader[T]): Validated[M[T]]
Given a parent JsValue extracts and tries to convert the JsValue into a value of type
T
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )