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]) @HotSpotIntrinsicCandidate() @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. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. def withFilter(p: (A) => Boolean): WithFilter

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped