@Immutable public final class JsonValidator extends Object
One such instance exists per JsonSchemaFactory
. In fact, you have
to go through a factory to obtain an instance.
This class is also responsible for building JsonSchema
instances.
JsonSchemaFactory.getValidator()
Modifier and Type | Method and Description |
---|---|
com.github.fge.jsonschema.report.ProcessingReport |
validate(com.fasterxml.jackson.databind.JsonNode schema,
com.fasterxml.jackson.databind.JsonNode instance)
Validate a schema/instance pair
|
com.github.fge.jsonschema.report.ProcessingReport |
validateUnchecked(com.fasterxml.jackson.databind.JsonNode schema,
com.fasterxml.jackson.databind.JsonNode instance)
Validate a schema/instance pair (unchecked mode)
|
public com.github.fge.jsonschema.report.ProcessingReport validate(com.fasterxml.jackson.databind.JsonNode schema, com.fasterxml.jackson.databind.JsonNode instance) throws com.github.fge.jsonschema.exceptions.ProcessingException
schema
- the schemainstance
- the instancecom.github.fge.jsonschema.exceptions.ProcessingException
- an exception occurred during validationcom.github.fge.jsonschema.exceptions.unchecked.ProcessingError
- the schema or instance is nullpublic com.github.fge.jsonschema.report.ProcessingReport validateUnchecked(com.fasterxml.jackson.databind.JsonNode schema, com.fasterxml.jackson.databind.JsonNode instance)
The same warnings as described in JsonSchema.validateUnchecked(JsonNode)
apply
schema
- the schemainstance
- the instancecom.github.fge.jsonschema.exceptions.unchecked.ProcessingError
- the schema or instance is nullCopyright © 2014. All Rights Reserved.