Packages

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. Protected

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 contains[AA >: A](elem: AA): Boolean

    If this result is successful than checks for presence for elem, otherwise return false

  4. abstract def exists(p: (A) => Boolean): Boolean

    If this result is successful than check value with predicate p, otherwise return false

  5. abstract def flatMap[B](f: (A) => JsResult[B]): JsResult[B]

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

  6. 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.

  7. abstract def forall(p: (A) => Boolean): Boolean

    If this result is successful than check value with predicate p, otherwise return true.

    If this result is successful than check value with predicate p, otherwise return true. Follows scala.collection.Traversable.forall semantics

  8. abstract def foreach(f: (A) => Unit): Unit

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

  9. abstract def get: A

    Not recommended

  10. abstract def getOrElse[AA >: A](t: => AA): AA

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

  11. abstract def isError: Boolean
  12. abstract def isSuccess: Boolean
  13. abstract def map[B](f: (A) => B): JsResult[B]

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

  14. abstract def orElse[AA >: A](t: => JsResult[AA]): JsResult[AA]

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

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

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

  16. abstract def recoverTotal[AA >: A](errManager: (JsError) => AA): AA

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

  17. abstract def recoverWith[AA >: A](errManager: (JsError) => JsResult[AA]): JsResult[AA]

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

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

    Updates the JSON path

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def collect[B](otherwise: JsonValidationError)(p: PartialFunction[A, B]): JsResult[B]
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def filter(otherwise: JsError)(p: (A) => Boolean): JsResult[A]
  10. def filter(p: (A) => Boolean): JsResult[A]
  11. def filterNot(p: (A) => Boolean): JsResult[A]
  12. def filterNot(error: JsError)(p: (A) => Boolean): JsResult[A]
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. def withFilter(p: (A) => Boolean): WithFilter

Inherited from AnyRef

Inherited from Any

Ungrouped