Class NumericValidator
java.lang.Object
org.apache.synapse.commons.json.jsonprocessor.validators.NumericValidator
validate numeric instances according to the given schema.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonPrimitivevalidateNumeric(com.google.gson.JsonObject inputObject, String value) Take JSON schema, number as a string input and validate.
-
Method Details
-
validateNumeric
public static com.google.gson.JsonPrimitive validateNumeric(com.google.gson.JsonObject inputObject, String value) throws ParserException, ValidatorException Take JSON schema, number as a string input and validate.- Parameters:
inputObject- JSON schema.value- numeric value- Returns:
- JsonPrimitive contains a number
- Throws:
ParserException- Exception occurred in data type conversions.ValidatorException- Exception occurred in schema validations.
-