Package com.sdicons.json.validator
Class JSONValidator
java.lang.Object
com.sdicons.json.validator.JSONValidator
- All Implemented Interfaces:
Validator
A validator that accepts a validator description in JSON format.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJSONValidator(JSONObject aValidation) Construct the validator based on the JSON description. -
Method Summary
-
Field Details
-
validator
-
-
Constructor Details
-
JSONValidator
Construct the validator based on the JSON description.- Parameters:
aValidation- The JSON description of the validator.- Throws:
ValidationException- If the JSON description did not represent a validator.
-
-
Method Details
-
validate
Validate a JSON value according to the rules described in the validator rules.- Specified by:
validatein interfaceValidator- Parameters:
aValue-- Throws:
ValidationException
-