public final class JsonSchema extends Object
This class is thread-safe and immutable: you can validate as many inputs as you want with one instance.
JsonSchemaFactory| Modifier and Type | Field and Description |
|---|---|
private JsonValidatorCache |
cache
The validator cache
|
private EnumSet<ValidationFeature> |
features
The feature set
|
private FormatBundle |
formatBundle
The format bundle
|
private SchemaNode |
schemaNode
The schema node
|
| Constructor and Description |
|---|
JsonSchema(JsonValidatorCache cache,
EnumSet<ValidationFeature> features,
FormatBundle bundle,
SchemaNode schemaNode)
Constructor, package private
|
private final JsonValidatorCache cache
private final EnumSet<ValidationFeature> features
private final FormatBundle formatBundle
private final SchemaNode schemaNode
JsonSchema(JsonValidatorCache cache, EnumSet<ValidationFeature> features, FormatBundle bundle, SchemaNode schemaNode)
cache - the validator cachefeatures - the feature setschemaNode - the schema nodepublic ValidationReport validate(JsonNode instance)
instance - the JSON document to validateValidationReportCopyright © 2012. All Rights Reserved.