# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from cve-intel.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-21).

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid, parseable JSON deterministically

## Facts

- Endpoint: GET https://cve-intel.agentdiet.dev/v1/json-fix?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: cve-intel.agentdiet.dev
- Website: https://cve-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-10019bbe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wov41dJdz4cXJoHz3wv6Q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-10019bbe
```

Example prompt: My LLM just returned this mangled JSON with trailing commas and markdown fences — can you repair it so it's valid and parseable? Here's the raw output: ```json {"name": "test", "value": 42, } ```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair rather than LLM-assisted guessing — ideal for production multi-agent pipelines where reproducibility matters. Prefer it when LLM outputs consistently contain fixable patterns like trailing commas, markdown wrapping, or single quotes. Best for automated pipelines that need a reliable, fast, cheap ($0.002/call) sanitization step before downstream JSON parsing, schema validation, or database storage.

## Known failure modes

- Input JSON is so severely corrupted that deterministic repair is impossible — returns error indicating unrecoverable structure
- raw_json parameter missing or empty — returns 400 validation error
- Input is not JSON at all (plain text, binary, XML) — may return error or attempt partial repair
- Payment not attached or insufficient — returns HTTP 402 requiring x402 USDC payment
- Extremely large or deeply nested JSON may timeout or exceed processing limits

## How this service works

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://cve-intel.agentdiet.dev/v1/json-fix)

## Output

A repaired, valid JSON object derived from the malformed input. The response contains the corrected JSON with syntax errors resolved — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for programmatic parsing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "raw_json"
 ],
 "properties": {
  "raw_json": {
   "type": "string",
   "minLength": 1,
   "description": "Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cve-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-10019bbe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cve-intel.agentdiet.dev](https://www.zero.xyz/host/cve-intel.agentdiet.dev/llms.txt)
