# Class SchemaUtils

java.lang.Object
com.google.adk.SchemaUtils

public final class SchemaUtils extends Object
Utility class for validating schemas.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `validateMapOnSchema(Map<String,Object> args, com.google.genai.types.Schema schema, Boolean isInput)`
  Validates a map against a schema.
  `static Map<String,Object>`
  `validateOutputSchema(String output, com.google.genai.types.Schema schema)`
  Validates an output string against a schema.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### validateMapOnSchema

    public static void validateMapOnSchema(Map<String,Object> args, com.google.genai.types.Schema schema, Boolean isInput)
    Validates a map against a schema.
    Parameters:
      `args` - The map to validate.
      `schema` - The schema to validate against.
      `isInput` - Whether the map is an input or output.
    Throws:
      `IllegalArgumentException` - If the map does not match the schema.

  - ### validateOutputSchema

    public static Map<String,Object> validateOutputSchema(String output, com.google.genai.types.Schema schema) throws com.fasterxml.jackson.core.JsonProcessingException
    Validates an output string against a schema.
    Parameters:
      `output` - The output string to validate.
      `schema` - The schema to validate against.
    Returns:
      The output map.
    Throws:
      `IllegalArgumentException` - If the output string does not match the schema.
      `com.fasterxml.jackson.core.JsonProcessingException` - If the output string cannot be parsed.