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

# 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

  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.

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

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

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