# 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 JSON so multi-agent pipelines never crash.

## Facts

- Endpoint: GET https://cve-intel.agentdiet.dev/v1/json-validator?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-93290103
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0JCmCBdskF4_XVes8_Scd

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-93290103
```

Example prompt: This JSON came back from an LLM and it won't parse — it has trailing commas, single quotes around keys, and markdown code fences. Can you repair it and give me back valid JSON? Here's the raw string: ```{'name': 'Alice', 'age': 30,}```

## When to prefer this

Choose this endpoint when you need deterministic, rule-based JSON repair for LLM outputs — particularly when dealing with trailing commas, markdown code fences, single-quoted keys, or truncated strings in a multi-agent or automated pipeline. Prefer this over manual string manipulation when reliability and consistency matter at scale, and over LLM-based repair when you need fast, predictable, non-generative correction.

## Known failure modes

- JSON is too severely truncated to reconstruct meaningfully — returns error or best-effort partial repair
- Input is not recognizably JSON at all — endpoint may return error or pass-through
- Ambiguous repair cases where multiple valid interpretations exist may produce unexpected output
- Payment required error (HTTP 402) if x402 micropayment not included

## 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-validator)

## Output

Returns a JSON object containing the repaired, valid JSON string that has been cleaned of markdown fences, trailing commas, single-quoted keys, and other common LLM-induced malformations — ready to be parsed and passed to downstream pipeline steps.

## 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-93290103/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)
