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

# Class StringValidator

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

public class StringValidator extends Object
This class validate strings against the given schema object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static com.google.gson.JsonPrimitive`
  `validateNominal(com.google.gson.JsonObject inputObject, String value)`
  Validate a given string against its schema.

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

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

- ## Method Details

  - ### validateNominal

    public static com.google.gson.JsonPrimitive validateNominal(com.google.gson.JsonObject inputObject, String value) throws ValidatorException, ParserException
    Validate a given string against its schema.
    Parameters:
      `inputObject` - json schema as an object.
      `value` - input string.
    Returns:
      if valid return a JsonPrimitive created using input string.
    Throws:
      `ValidatorException` - Didn't met validation criteria.
      `ParserException` - Exception occurs in data type conversions.