final class ArrayValidator extends ContainerValidator
Array children must obey one schema, depending on the values of the
items and additionalItems schema keywords. No items
is equivalent to an empty array.
Array indices start at 0. For a given index:
items, there is a
match;additionalItems is considered (if true or
nonexistent, then an empty schema).| Modifier and Type | Field and Description |
|---|---|
private JsonNode |
additionalItems |
private List<JsonNode> |
items |
cache, EMPTY_SCHEMA, schema| Constructor and Description |
|---|
ArrayValidator(JsonValidatorCache cache,
SchemaNode schemaNode) |
| Modifier and Type | Method and Description |
|---|---|
private JsonNode |
getSchema(int index) |
boolean |
validate(ValidationContext context,
ValidationReport report,
JsonNode instance)
Validate the instance, and tell whether validation should continue
|
private final JsonNode additionalItems
ArrayValidator(JsonValidatorCache cache, SchemaNode schemaNode)
public boolean validate(ValidationContext context, ValidationReport report, JsonNode instance)
JsonValidatorNote: the return value is currently unused.
context - the validation contextreport - the validation reportinstance - the instance to validateprivate JsonNode getSchema(int index)
Copyright © 2012. All Rights Reserved.