class SchemaValidator extends AnyRef
The schema validator.
- Alphabetic
- By Inheritance
- SchemaValidator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SchemaValidator(schemaVersion: Option[SchemaVersion] = None, formats: Map[String, SchemaFormat] = DefaultFormats.formats, resolverFactory: UrlStreamResolverFactory = UrlStreamResolverFactory(), cache: DocumentCache = DocumentCache())(implicit lang: Lang)
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
- val DefaultVersion: SchemaVersion
- def addFormat(format: SchemaFormat): SchemaValidator
Add a custom format
Add a custom format
- format
the custom format
- returns
a new validator instance containing the custom format
- def addSchema(id: String, schema: SchemaType): SchemaValidator
Add a schema.
Add a schema.
- id
the id of the schema
- schema
the schema
- def addUrlHandler(handler: URLStreamHandler, scheme: String): SchemaValidator
Add a URLStreamHandler that is capable of handling absolute with a specific scheme.
Add a URLStreamHandler that is capable of handling absolute with a specific scheme.
- handler
the UrlHandler to be added
- returns
a new validator instance
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val cache: DocumentCache
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- val formats: Map[String, SchemaFormat]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val lang: Lang
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val resolverFactory: UrlStreamResolverFactory
- val schemaVersion: Option[SchemaVersion]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def validate[A](schema: SchemaType, input: A)(implicit arg0: Format[A]): JsResult[A]
Convert the given value via the specified Format instance to a JsValue, validate it against the given schema and convert it back.
Convert the given value via the specified Format instance to a JsValue, validate it against the given schema and convert it back.
- schema
the schema to validate against
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schema: SchemaType, input: A, writes: Writes[A]): JsResult[JsValue]
Convert the given value via the specified Writes instance to a JsValue and validate it against the schema.
Convert the given value via the specified Writes instance to a JsValue and validate it against the schema.
- schema
the schema to validate against
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schema: SchemaType, input: => JsValue, reads: Reads[A]): JsResult[A]
Validate the given JsValue against the schema and convert the result via the specified Reads instance in case it has been successful.
Validate the given JsValue against the schema and convert the result via the specified Reads instance in case it has been successful.
- schema
the schema to validate against
- input
the value to be validated
- returns
a JsResult holding the validation result
- def validate(schema: SchemaType)(input: => JsValue): JsResult[JsValue]
Validate the given JsValue against the given schema.
Validate the given JsValue against the given schema.
- schema
the schema to validate against
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schemaUrl: URL, input: A)(implicit arg0: Format[A]): JsResult[A]
Convert the given value via the specified Format instance to a JsValue, validate it against the schema at the given URL, and convert it back.
Convert the given value via the specified Format instance to a JsValue, validate it against the schema at the given URL, and convert it back.
- schemaUrl
source from where to read the scheam from
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schemaSource: Source, input: A)(implicit arg0: Format[A]): JsResult[A]
Convert the given value via the specified Format instance to a JsValue, validate it against the schema at the given URL, and convert it back.
Convert the given value via the specified Format instance to a JsValue, validate it against the schema at the given URL, and convert it back.
- schemaSource
source from where to read the scheam from
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schemaUrl: URL, input: => A, writes: Writes[A]): JsResult[JsValue]
Convert the given value via the specified Writes instance to a JsValue and validate it against the schema located at the given URL.
Convert the given value via the specified Writes instance to a JsValue and validate it against the schema located at the given URL.
- schemaUrl
the URL from where to read the schema from
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schemaSource: Source, input: => A, writes: Writes[A]): JsResult[JsValue]
Convert the given value via the specified Writes instance to a JsValue and validate it against the schema located at the given URL.
Convert the given value via the specified Writes instance to a JsValue and validate it against the schema located at the given URL.
- schemaSource
source from where to read the scheam from
- input
the value to be validated
- returns
a JsResult holding the valid result
- def validate[A](schemaUrl: URL, input: => JsValue, reads: Reads[A]): JsResult[A]
Validate the given JsValue against the schema located at the given URL and convert the result via the specified Reads instance in case it has been successful.
Validate the given JsValue against the schema located at the given URL and convert the result via the specified Reads instance in case it has been successful.
- schemaUrl
the URL from where to read the schema from
- input
the value to be validated
- returns
a JsResult holding the validation result
- def validate[A](schemaSource: Source, input: => JsValue, reads: Reads[A]): JsResult[A]
Validate the given JsValue against the schema located at the given URL and convert the result via the specified Reads instance in case it has been successful.
Validate the given JsValue against the schema located at the given URL and convert the result via the specified Reads instance in case it has been successful.
- schemaSource
source from where to read the schema from
- input
the value to be validated
- returns
a JsResult holding the validation result
- def validate(schemaSource: Source): (JsValue) => JsResult[JsValue]
- def validate(schemaUrl: URL): (JsValue) => JsResult[JsValue]
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])