Class ArrayValidator


  • public class ArrayValidator
    extends Object
    This class will validate json arrays according to the schema.
    • Method Detail

      • validateArray

        public static com.google.gson.JsonArray validateArray​(Map.Entry<String,​com.google.gson.JsonElement> input,
                                                              com.google.gson.JsonObject schema)
                                                       throws ValidatorException,
                                                              ParserException
        This method will validates an input array according to a given schema.
        Parameters:
        input - input array as a Map.
        schema - JSON schema as an object.
        Returns:
        Validated JSON array.
        Throws:
        ValidatorException - Exception occurs in validation process.
        ParserException - Exception occurs in data type parsing.