Package com.sdicons.json.validator
Class JSONValidator
- java.lang.Object
-
- com.sdicons.json.validator.JSONValidator
-
-
Constructor Summary
Constructors Constructor Description JSONValidator(JSONObject aValidation)
Construct the validator based on the JSON description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(JSONValue aValue)
Validate a JSON value according to the rules described in the validator rules.
-
-
-
Field Detail
-
validator
private Validator validator
-
-
Constructor Detail
-
JSONValidator
public JSONValidator(JSONObject aValidation) throws ValidationException
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 Detail
-
validate
public void validate(JSONValue aValue) throws ValidationException
Validate a JSON value according to the rules described in the validator rules.- Specified by:
validate
in interfaceValidator
- Parameters:
aValue
-- Throws:
ValidationException
-
-