public class CustomPredicate extends Predicate
Example
{
"name" :"Custom test",
"type" :"custom",
"class" : "com.sdicons.json.validator.MyValidator"
}
CustomValidator
Constructor and Description |
---|
CustomPredicate(String aName,
JSONObject aRule,
Map<String,Validator> aRuleset) |
public CustomPredicate(String aName, JSONObject aRule, Map<String,Validator> aRuleset) throws ValidationException
ValidationException
public void validate(JSONValue aValue) throws ValidationException
Validator
aValue
- The JSONValue that has to be validated.ValidationException
- If the validation fails.Copyright © 2012. All Rights Reserved.