public final class SyntaxJsonValidator extends Object implements JsonValidator
This validator checks the schema syntax (as its name implies). Validation stops if the schema is deemed invalid.
Its next() method always returns an
InstanceJsonValidator.
| Modifier and Type | Field and Description |
|---|---|
private JsonSchemaFactory |
factory |
private SchemaNode |
schemaNode |
| Constructor and Description |
|---|
SyntaxJsonValidator(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
SyntaxJsonValidator(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.