public final class InstanceJsonValidator extends Object implements JsonValidator
This is the first validator which actually checks the validated instance. Validation stops if the instance is not a container instance (ie, an array or an object).
Its next() method will return either of an
ArrayJsonValidator or an ObjectJsonValidator depending on the
instance type.
| Modifier and Type | Field and Description |
|---|---|
private JsonSchemaFactory |
factory |
private NodeType |
instanceType |
private SchemaNode |
schemaNode |
private Set<KeywordValidator> |
validators |
| Constructor and Description |
|---|
InstanceJsonValidator(JsonSchemaFactory factory,
SchemaNode schemaNode) |
| Modifier and Type | Method and Description |
|---|---|
JsonValidator |
next()
Return the next validator in the chain
|
boolean |
validate(ValidationContext context,
ValidationReport report,
JsonNode instance)
Validate the instance, and tell whether validation should continue
|
private final JsonSchemaFactory factory
private final SchemaNode schemaNode
private final Set<KeywordValidator> validators
private NodeType instanceType
InstanceJsonValidator(JsonSchemaFactory factory, SchemaNode schemaNode)
public boolean validate(ValidationContext context, ValidationReport report, JsonNode instance)
JsonValidatorvalidate in interface JsonValidatorcontext - the validation contextreport - the validation reportinstance - the instance to validatepublic JsonValidator next()
JsonValidatorThis will be called iif
JsonValidator.validate(ValidationContext, ValidationReport, JsonNode)
returns true.
next in interface JsonValidatorCopyright © 2012. All Rights Reserved.