public interface Validator
Modifier and Type | Method and Description |
---|---|
static Validator |
create(JsonSchema schema,
JsonSchemaOptions options)
Creates a new validator with some initial schema and options.
|
OutputUnit |
validate(Object instance)
Validate a given input against the initial schema
|
static Validator create(JsonSchema schema, JsonSchemaOptions options)
SchemaRepository
instance and use the
SchemaRepository.validator(String)
} method. The use of a String
key allows avoiding re-parsing
and fast lookups.schema
- the initial schemaoptions
- the validator optionsOutputUnit validate(Object instance) throws SchemaException
instance
- instance to validateSchemaException
- if the validation cannot complete, for example when a reference is missing.Copyright © 2024 Eclipse. All rights reserved.