Perf Validate icon

Perf Validate

Validate JSON against a schema and auto-repair errors. Routes to "Valid" or "Invalid" output.

Perf Validate

AI-generated

Summary

Validate JSON against a schema and optionally auto‑repair errors, routing items to Valid or Invalid outputs.

Inputs

  • content (required) — JSON string to validate
  • targetSchema (required) — JSON Schema to validate against
  • repairMode — Error handling mode: best_effort or strict

Output shape

Array of two items: first is an array of valid result objects, second is an array of invalid result objects

Each result object includes fields like corrected_json, changes, validation_errors; invalid items may contain an error message if validation rejects the payload.

Examples

Example 1: Validate incoming data against a schema and automatically repair errors

Content set to $json, Target Schema set to a JSON Schema string, Repair Mode set to "best_effort"

Example 2: Strict validation that rejects on any error

Content set to $json, Target Schema set to a JSON Schema string, Repair Mode set to "strict"

Links

Discussion