case class JsSuccess[T](value: T, path: JsPath = JsPath()) extends JsResult[T] with Product with Serializable
- Alphabetic
- By Inheritance
- JsSuccess
- Serializable
- Product
- Equals
- JsResult
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class WithFilter extends AnyRef
- Definition Classes
- JsResult
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def asEither: Either[Seq[(JsPath, Seq[JsonValidationError])], T]
Returns either the result errors (at
Left
), or the successful value (atRight
). - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asOpt: Option[T]
Transforms this result either
Some
option with the successful value, or asNone
in case of JSON error. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[B](otherwise: JsonValidationError)(p: PartialFunction[T, B]): JsResult[B]
- Definition Classes
- JsResult
- def contains[AA >: T](elem: AA): Boolean
If this result is successful than checks for presence for elem, otherwise return false
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def exists(p: (T) => Boolean): Boolean
If this result is successful than check value with predicate p, otherwise return false
- def filter(otherwise: JsError)(p: (T) => Boolean): JsResult[T]
- Definition Classes
- JsResult
- def filter(p: (T) => Boolean): JsResult[T]
- Definition Classes
- JsResult
- def filterNot(p: (T) => Boolean): JsResult[T]
- Definition Classes
- JsResult
- def filterNot(error: JsError)(p: (T) => Boolean): JsResult[T]
- Definition Classes
- JsResult
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[U](f: (T) => JsResult[U]): JsResult[U]
If this result is successful, applies the function
f
on the parsed value. - def fold[U](invalid: (Seq[(JsPath, Seq[JsonValidationError])]) => U, valid: (T) => U): U
Either applies the
invalid
function if this result is an error, or applies thevalid
function on the successful value. - def forall(p: (T) => Boolean): Boolean
If this result is successful than check value with predicate p, otherwise return true.
- def foreach(f: (T) => Unit): Unit
If this result is successful, applies the function
f
on the parsed value. - def get: T
Not recommended
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getOrElse[U >: T](t: => U): U
Either returns the successful value, or the value from
t
. - val isError: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isSuccess: Boolean
- def map[U](f: (T) => U): JsResult[U]
If this result is successful, applies the function
f
on the parsed value. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def orElse[U >: T](t: => JsResult[U]): JsResult[U]
Either returns this result if successful, or the result from
t
. - val path: JsPath
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def recover[U >: T](errManager: PartialFunction[JsError, U]): JsResult[U]
If this result is not successful, recovers the errors with the given function.
- def recoverTotal[U >: T](errManager: (JsError) => U): U
If this result is not successful, recovers the errors with the given function.
- def recoverWith[U >: T](errManager: (JsError) => JsResult[U]): JsResult[U]
If this result is not successful, recovers the errors with the given function.
- def repath(path: JsPath): JsResult[T]
Updates the JSON path
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val value: T
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withFilter(p: (T) => Boolean): WithFilter
- Definition Classes
- JsResult