Class NumericValidator
- java.lang.Object
-
- org.apache.synapse.commons.json.jsonprocessor.validators.NumericValidator
-
public class NumericValidator extends Object
validate numeric instances according to the given schema.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.gson.JsonPrimitive
validateNumeric(com.google.gson.JsonObject inputObject, String value)
Take JSON schema, number as a string input and validate.
-
-
-
Method Detail
-
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.
-
-