play.api.libs.json

JsResult

sealed trait JsResult[+A] extends AnyRef

Self Type
JsResult[A]
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JsResult
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final class WithFilter extends AnyRef

Abstract Value Members

  1. abstract def asEither: Either[Seq[(JsPath, Seq[JsonValidationError])], A]

    Returns either the result errors (at Left), or the successful value (at Right).

  2. abstract def asOpt: Option[A]

    Transforms this result either Some option with the successful value, or as None in case of JSON error.

  3. abstract def flatMap[B](f: (A) ⇒ JsResult[B]): JsResult[B]

    If this result is successful, applies the function f on the parsed value.

  4. abstract def fold[B](invalid: (Seq[(JsPath, Seq[JsonValidationError])]) ⇒ B, valid: (A) ⇒ B): B

    Either applies the invalid function if this result is an error, or applies the valid function on the successful value.

  5. abstract def foreach(f: (A) ⇒ Unit): Unit

    If this result is successful, applies the function f on the parsed value.

  6. abstract def get: A

    Not recommended

  7. abstract def getOrElse[AA >: A](t: ⇒ AA): AA

    Either returns the successful value, or the value from t.

  8. abstract def isError: Boolean

  9. abstract def isSuccess: Boolean

  10. abstract def map[B](f: (A) ⇒ B): JsResult[B]

    If this result is successful, applies the function f on the parsed value.

  11. abstract def orElse[AA >: A](t: ⇒ JsResult[AA]): JsResult[AA]

    Either returns this result if successful, or the result from t.

  12. abstract def recover[AA >: A](errManager: PartialFunction[JsError, AA]): JsResult[AA]

    If this result is not successful, recovers the errors with the given function.

  13. abstract def recoverTotal[AA >: A](errManager: (JsError) ⇒ AA): AA

    If this result is not successful, recovers the errors with the given function.

  14. abstract def repath(path: JsPath): JsResult[A]

    Updates the JSON path

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collect[B](otherwise: JsonValidationError)(p: PartialFunction[A, B]): JsResult[B]

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def filter(otherwise: JsError)(p: (A) ⇒ Boolean): JsResult[A]

  12. def filter(p: (A) ⇒ Boolean): JsResult[A]

  13. def filterNot(p: (A) ⇒ Boolean): JsResult[A]

  14. def filterNot(error: JsError)(p: (A) ⇒ Boolean): JsResult[A]

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. def withFilter(p: (A) ⇒ Boolean): WithFilter

Inherited from AnyRef

Inherited from Any

Ungrouped