JSON Guardian
JSON Guardian prevents broken LLM outputs from crashing your production applications. Built in Rust for maximum performance, it validates JSON against your schemas, auto-repairs common syntax errors, and enforces required fields with smart defaults. Perfect for: - AI/LLM applications - Microservices validation - Data pipeline quality control - API response validation Features: - Sub-10ms…
JSON Guardian endpoints
| Method | Endpoint | Description |
|---|---|---|
| Health | ||
| GET |
healthCheck /health |
Check if the API is running. Returns 'OK' if healthy. |
| Validation | ||
| POST |
validateJson /api/v1/validate |
Validate a JSON string against a JSON Schema (Draft 7). Returns validation status and detailed error messages if invalid. |
| Repair | ||
| POST |
repairJson /api/v1/repair |
Attempt to fix malformed JSON syntax. **Fixes:** - Trailing commas: `{"a": 1,}` → `{"a": 1}` - Single quotes: `{'a': 'b'}` → `{"a": "b"}` - Unquoted keys: `{name: "John"}` →… |
| Enforcement | ||
| POST |
enforceSchema /api/v1/enforce |
Repair JSON if malformed, then enforce the schema by adding missing required fields with default values. **Type Coercion:** - Converts `"twenty-five"` to `25` for integer fields… |
| Extraction | ||
| POST |
extractJson /api/v1/extract |
Extract valid JSON from messy LLM outputs that include prose, markdown code fences, and other chatter. **Handles:** - `Sure! Here is the data: \`\`\`json {...}\`\`\` Hope that… |
| Streaming | ||
| POST |
completePartialJson /api/v1/partial |
Complete partial/streaming JSON to make it valid. Essential for showing real-time UI updates during LLM streaming. **Handles:** - `{"user": {"name": "Joh` → `{"user": {"name":… |
| Batch | ||
| POST |
batchProcess /api/v1/batch |
Process multiple items with any operation type in a single request. **Supported Operations:** - `validate` - Validate JSON against schema - `repair` - Fix malformed JSON -… |
JSON Guardian pricing
| Plan | Price | Rate limit | Quotas |
|---|---|---|---|
| BASIC | Free | — |
|
| PRO Recommended | $9.99 / month | — |
|
| ULTRA | $29.99 / month | — |
|
| MEGA | $99.99 / month | — |
|