Class ObjectValidator
- java.lang.Object
-
- org.forgerock.json.schema.validator.ObjectValidator
-
public final class ObjectValidator extends Object
The ObjectValidator is a sample implementation of how to use the validator.The validators was designed to keep in the memory or other cache and validate multiple instances. This implementation creates a new
Validator
each time and uses theFailFastErrorHandler
to validate the instance object.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
validate(Object node, Map<String,Object> schema)
Validate the givennode
against theschema
-
-
-
Method Detail
-
validate
public static boolean validate(Object node, Map<String,Object> schema)
Validate the givennode
against theschema
This implementation is pessimistic and returns false if any exception was thrown.
- Parameters:
node
- instance to validateschema
- schema for validation- Returns:
- true if the object does not violates the schema otherwise false
-
-