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

# Class BooleanValidator

java.lang.Object
org.apache.synapse.commons.json.jsonprocessor.validators.BooleanValidator

public class BooleanValidator extends Object
This class validate boolean values against a given schema.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static com.google.gson.JsonPrimitive`
  `validateBoolean(com.google.gson.JsonObject inputObject, String value)`
  Validate a boolean string according to a given schema.

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

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

- ## Method Details

  - ### validateBoolean

    public static com.google.gson.JsonPrimitive validateBoolean(com.google.gson.JsonObject inputObject, String value) throws ValidatorException, ParserException
    Validate a boolean string according to a given schema.
    Parameters:
      `inputObject` - json schema.
      `value` - boolean string.
    Returns:
      JsonPrimitive contains the parsed boolean.
    Throws:
      `ValidatorException` - exception occurs in validation.
      `ParserException` - exception occurs when parsing.