Class JSONValidator

  • All Implemented Interfaces:
    Validator

    public class JSONValidator
    extends java.lang.Object
    implements Validator
    A validator that accepts a validator description in JSON format.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.