final class ArrayValidator extends Object implements JsonValidator
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 |
| Constructor and Description |
|---|
ArrayValidator(JsonNode schema) |
| Modifier and Type | Method and Description |
|---|---|
(package 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(JsonNode schema)
public boolean validate(ValidationContext context, ValidationReport report, JsonNode instance)
JsonValidatorNote: the return value is currently unused.
validate in interface JsonValidatorcontext - the validation contextreport - the validation reportinstance - the instance to validateJsonNode getSchema(int index)
Copyright © 2012. All Rights Reserved.