org.apache.synapse.commons.json.jsonprocessor.validators

## Class ArrayValidator

- java.lang.Object
- - org.apache.synapse.commons.json.jsonprocessor.validators.ArrayValidator

-     public class ArrayValidator
      extends Object

  This class will validate json arrays according to the schema.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static com.google.gson.JsonArray` | `validateArray(Map.Entry<String,com.google.gson.JsonElement> input, com.google.gson.JsonObject schema)` This method will validates an input array according to a given schema.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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.

Copyright © 2005–2024 Apache Software Foundation. All rights reserved.