Package com.networknt.schema
Class AbstractJsonValidator
- java.lang.Object
-
- com.networknt.schema.AbstractJsonValidator
-
- All Implemented Interfaces:
JsonValidator
public abstract class AbstractJsonValidator extends Object implements JsonValidator
-
-
Field Summary
-
Fields inherited from interface com.networknt.schema.JsonValidator
AT_ROOT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractJsonValidator(String keyword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValidationMessagebuildValidationMessage(ErrorMessageType errorMessageType, String at, String... arguments)protected ValidationMessagebuildValidationMessage(ErrorMessageType errorMessageType, String at, Map<String,Object> details)protected Set<ValidationMessage>fail(ErrorMessageType errorMessageType, String at, String... arguments)protected Set<ValidationMessage>fail(ErrorMessageType errorMessageType, String at, Map<String,Object> details)protected Set<ValidationMessage>pass()Set<ValidationMessage>validate(com.fasterxml.jackson.databind.JsonNode node)Validate the given root JsonNode, starting at the root of the data path.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.networknt.schema.JsonValidator
validate
-
-
-
-
Constructor Detail
-
AbstractJsonValidator
protected AbstractJsonValidator(String keyword)
-
-
Method Detail
-
validate
public Set<ValidationMessage> validate(com.fasterxml.jackson.databind.JsonNode node)
Description copied from interface:JsonValidatorValidate the given root JsonNode, starting at the root of the data path.- Specified by:
validatein interfaceJsonValidator- Parameters:
node- JsonNode- Returns:
- A list of ValidationMessage if there is any validation error, or an empty list if there is no error.
-
buildValidationMessage
protected ValidationMessage buildValidationMessage(ErrorMessageType errorMessageType, String at, String... arguments)
-
buildValidationMessage
protected ValidationMessage buildValidationMessage(ErrorMessageType errorMessageType, String at, Map<String,Object> details)
-
pass
protected Set<ValidationMessage> pass()
-
fail
protected Set<ValidationMessage> fail(ErrorMessageType errorMessageType, String at, Map<String,Object> details)
-
fail
protected Set<ValidationMessage> fail(ErrorMessageType errorMessageType, String at, String... arguments)
-
-