sealed trait JsLookupResult extends JsReadable

Source
JsLookup.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsLookupResult
  2. JsReadable
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Concrete Value Members

  1. 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
  2. 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
  3. def get: JsValue
  4. def getOrElse(v: => JsValue): JsValue
  5. def isDefined: Boolean
  6. def isEmpty: Boolean
  7. def orElse(alternative: => JsLookupResult): JsLookupResult

    If this result is defined return this.

    If this result is defined return this. Otherwise return alternative.

  8. def toEither: Either[, JsValue]
  9. def toOption: Option[JsValue]

    Tries to convert the node into a JsValue

  10. 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
  11. 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
  12. def validateOpt[A](implicit rds: Reads[A]): JsResult[Option[A]]

    If this result contains JsNull or is undefined, returns JsSuccess(None).

    If this result contains JsNull or is undefined, returns JsSuccess(None). Otherwise returns the result of validating as an A and wrapping the result in a Some.