play.api.libs.json.JsonValidationError
See theJsonValidationError companion class
object JsonValidationError
Attributes
- Companion
- class
- Graph
-
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JsonValidationError.type
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.JsonValidationError
def details(err: JsonValidationError): Option[(String, Any)] = err match {
case JsonValidationError.Detailed(msg, arg) => Some(msg -> arg)
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.JsonValidationError
def msg(err: JsonValidationError): Option[String] = err match {
case JsonValidationError.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
import play.api.libs.json.JsonValidationError
val simpleError = JsonValidationError("error.key1")
val detailedError = JsonValidationError("error.key1", "details")
Attributes
In this article