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

## Class NumericValidator

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

-     public class NumericValidator
      extends java.lang.Object

  validate numeric instances according to the given schema.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static com.google.gson.JsonPrimitive` | `validateNumeric(com.google.gson.JsonObject inputObject, java.lang.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 Detail

    - #### validateNumeric

          public static com.google.gson.JsonPrimitive validateNumeric(com.google.gson.JsonObject inputObject,
                                                                      java.lang.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.

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.