# 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 don't crash

## Facts

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

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

Example prompt: This JSON from the LLM is broken — it has trailing commas and is wrapped in markdown fences. Can you repair it so it's valid and parseable: ```{"name": "Alice", "age": 30,}```?

## When to prefer this

Choose this endpoint when LLM or agent-generated JSON is breaking downstream parsing in a multi-agent pipeline and you need a fast, deterministic fix — especially for common issues like trailing commas, markdown code fences, or single quotes. Prefer this over writing custom regex fixers when you need reliable, consistent repair across diverse LLM output formats in production pipelines.

## Known failure modes

- Input JSON is so severely malformed it cannot be deterministically inferred, returning an error or best-effort partial result
- Input string is not JSON at all (e.g. plain text or HTML), resulting in a failure or empty response
- Ambiguous truncation where multiple valid completions exist, potentially returning an incorrect but syntactically valid structure
- Very large JSON strings may hit query parameter length limits when passed via GET

## 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/malformed-json-healer)

## Output

A repaired, valid JSON object with syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes replaced with double quotes, and truncated structures closed — ready for downstream parsing without errors.

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