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

## Class BooleanValidator

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

-     public class BooleanValidator
      extends java.lang.Object

  This class validate boolean values against a given schema.

- - ### Method Summary

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

    - #### validateBoolean

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

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