Skip to main content

validate_output

Function validate_output 

Source
pub fn validate_output(
    output: &Value,
    schema: &Value,
) -> Result<(), SchemaError>
Expand description

Validates a JSON value against the given JSON Schema.

§Arguments

  • output - The agent’s output to validate.
  • schema - The JSON Schema to validate against.

§Returns

  • Ok(()) if validation passes.
  • Err(SchemaError) with a description of why validation failed.