case class JsError(errors: Seq[(JsPath, Seq[JsonValidationError])]) extends JsResult[Nothing] with Product with Serializable
- Alphabetic
- By Inheritance
- JsError
- Serializable
- Product
- Equals
- JsResult
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new JsError(errors: Seq[(JsPath, Seq[JsonValidationError])])
Type Members
- final class WithFilter extends AnyRef
- Definition Classes
- JsResult
Value Members
- def ++(error: JsError): JsError
- def +:(error: (, JsonValidationError)): JsError
- def :+(error: (, JsonValidationError)): JsError
- def append(error: (, JsonValidationError)): JsError
- def asEither: Either[Seq[(JsPath, Seq[JsonValidationError])], Nothing]
Returns either the result errors (at
Left
), or the successful value (atRight
).Returns either the result errors (at
Left
), or the successful value (atRight
).- Definition Classes
- → JsResult
- val asOpt: None.type
Transforms this result either
Some
option with the successful value, or asNone
in case of JSON error.Transforms this result either
Some
option with the successful value, or asNone
in case of JSON error.- Definition Classes
- → JsResult
- def collect[B](otherwise: JsonValidationError)(p: PartialFunction[Nothing, B]): JsResult[B]
- Definition Classes
- JsResult
- def contains[AA](elem: AA): Boolean
If this result is successful than checks for presence for elem, otherwise return false
If this result is successful than checks for presence for elem, otherwise return false
- Definition Classes
- → JsResult
- val errors: Seq[(JsPath, Seq[JsonValidationError])]
- def exists(p: (Nothing) => Boolean): Boolean
If this result is successful than check value with predicate p, otherwise return false
If this result is successful than check value with predicate p, otherwise return false
- Definition Classes
- → JsResult
- def filter(otherwise: JsError)(p: (Nothing) => Boolean): JsResult[Nothing]
- Definition Classes
- JsResult
- def filter(p: (Nothing) => Boolean): JsResult[Nothing]
- Definition Classes
- JsResult
- def filterNot(p: (Nothing) => Boolean): JsResult[Nothing]
- Definition Classes
- JsResult
- def filterNot(error: JsError)(p: (Nothing) => Boolean): JsResult[Nothing]
- Definition Classes
- JsResult
- def flatMap[U](f: (Nothing) => JsResult[U]): JsResult[U]
If this result is successful, applies the function
f
on the parsed value.If this result is successful, applies the function
f
on the parsed value.- Definition Classes
- → JsResult
- def fold[U](invalid: (Seq[(JsPath, Seq[JsonValidationError])]) => U, valid: (Nothing) => U): U
Either applies the
invalid
function if this result is an error, or applies thevalid
function on the successful value.Either applies the
invalid
function if this result is an error, or applies thevalid
function on the successful value.- Definition Classes
- → JsResult
- def forall(p: (Nothing) => 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
- Definition Classes
- → JsResult
- def foreach(f: (Nothing) => Unit): Unit
If this result is successful, applies the function
f
on the parsed value.If this result is successful, applies the function
f
on the parsed value.- Definition Classes
- → JsResult
- def get: Nothing
Not recommended
Not recommended
- Definition Classes
- → JsResult
- def getOrElse[U](t: => U): U
Either returns the successful value, or the value from
t
.Either returns the successful value, or the value from
t
.- Definition Classes
- → JsResult
- val isError: Boolean
- Definition Classes
- → JsResult
- val isSuccess: Boolean
- Definition Classes
- → JsResult
- def map[U](f: (Nothing) => U): JsResult[U]
If this result is successful, applies the function
f
on the parsed value.If this result is successful, applies the function
f
on the parsed value.- Definition Classes
- → JsResult
- def orElse[U](t: => JsResult[U]): JsResult[U]
Either returns this result if successful, or the result from
t
.Either returns this result if successful, or the result from
t
.- Definition Classes
- → JsResult
- def prepend(error: (, JsonValidationError)): JsError
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def recover[U](errManager: PartialFunction[JsError, U]): JsResult[U]
If this result is not successful, recovers the errors with the given function.
If this result is not successful, recovers the errors with the given function.
- Definition Classes
- → JsResult
- def recoverTotal[U](errManager: (JsError) => U): U
If this result is not successful, recovers the errors with the given function.
If this result is not successful, recovers the errors with the given function.
- Definition Classes
- → JsResult
- def recoverWith[U](errManager: () => JsResult[U]): JsResult[U]
If this result is not successful, recovers the errors with the given function.
If this result is not successful, recovers the errors with the given function.
- Definition Classes
- → JsResult
- def repath(path: JsPath): JsResult[Nothing]
Updates the JSON path
Updates the JSON path
- Definition Classes
- → JsResult
- def withFilter(p: (Nothing) => Boolean): WithFilter
- Definition Classes
- JsResult
The result in case of parsing
errors
.