public class ObjectTypeValidator extends Validator
object
type.
Sample JSON Schema:
{
"type" : "object"
}
Constructor and Description |
---|
ObjectTypeValidator(Map<String,Object> schema,
List<String> jsonPointer)
Default ctor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
collectAllValidators(Collection<Validator> results)
Collects all the sub-validators held in this validator and aggregates them in the passed in Collection.
|
void |
validate(Object value,
JsonPointer at,
ErrorHandler handler)
Validates the
node value against the embedded schema object. |
collectAllValidators, collectAllValidators, getJsonPointer, getPath, isRequired, newList, resolveSchemaReferences, toString
public void validate(Object value, JsonPointer at, ErrorHandler handler)
node
value against the embedded schema object.
The selected error handler defines the behaviour of the validator. The
FailFastErrorHandler
throws exception at firs violation.
Other customised ErrorHandler
can collect all exceptions and after the validation the
examination of the handler
contains the final result.
value
- value to validateat
- JSONPath of the node. null means it's the root nodehandler
- customised error handler like FailFastErrorHandler
protected void collectAllValidators(Collection<Validator> results)
collectAllValidators
in class Validator
results
- where collected validators are aggregatedCopyright 2011-2017 ForgeRock AS.