Trait/Object

play.api.libs.json

JsResult

Related Docs: object JsResult | package json

Permalink

sealed trait JsResult[+A] extends AnyRef

Self Type
JsResult[A]
Source
JsResult.scala
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
Visibility
  1. Public
  2. All

Type Members

  1. final class WithFilter extends AnyRef

    Permalink

Abstract Value Members

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

    Permalink

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

  2. abstract def asOpt: Option[A]

    Permalink

    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]

    Permalink

    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

    Permalink

    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

    Permalink

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

  6. abstract def get: A

    Permalink

    Not recommended

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

    Permalink

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

  8. abstract def isError: Boolean

    Permalink
  9. abstract def isSuccess: Boolean

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

    Updates the JSON path

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
  13. def finalize(): Unit

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped