play.api.libs.json.JsError
See theJsError companion class
object JsError
Attributes
Members list
Type members
Classlikes
object Detailed
Extracts the first error details (message and its first argument).
Extracts the first error details (message and its first argument).
import play.api.libs.json.JsError
def cause(err: JsError): Option[(String, Exception)] = err match {
case JsError.Detailed(msg, ex: Exception) => Some(msg -> ex)
case _ => None
}
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Detailed.type
object Message
Extracts the first error message.
Extracts the first error message.
import play.api.libs.json.JsError
def msg(err: JsError): Option[String] = err match {
case JsError.Message(msg) => Some(msg)
case _ => None
}
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Message.type
Inherited types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
def merge(e1: Seq[(JsPath, Seq[JsonValidationError])], e2: Seq[(JsPath, Seq[JsonValidationError])]): Seq[(JsPath, Seq[JsonValidationError])]
In this article