Class ObjectValidator
java.lang.Object
org.apache.synapse.commons.json.jsonprocessor.validators.ObjectValidator
This class will validate json objects according to the schema.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonObjectvalidateObject(com.google.gson.JsonObject object, com.google.gson.JsonObject schema) This method will validate a given JSON input object according to
-
Method Details
-
validateObject
public static com.google.gson.JsonObject validateObject(com.google.gson.JsonObject object, com.google.gson.JsonObject schema) throws ParserException, ValidatorException This method will validate a given JSON input object according to- Parameters:
object- JSON Objectschema- JSON schema- Returns:
- validated object
- Throws:
ParserException- Exception occurred in data type conversions.ValidatorException- Exception occurred in schema validations.
-