# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Repairs malformed, truncated, or markdown-wrapped LLM JSON outputs so multi-agent pipelines can safely parse downstream responses

## Facts

- Endpoint: GET https://sec-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: sec-intel.agentdiet.dev
- Website: https://sec-intel.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8f13a6e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XJcp3SW8VK-gJpnqlFWWm

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 sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8f13a6e4
```

Example prompt: This JSON from the LLM response is broken — it has trailing commas, markdown code fences, and single quotes — can you repair it into valid JSON so I can continue processing it?

## When to prefer this

Choose this endpoint when your multi-agent pipeline needs a deterministic, fast, non-AI-based JSON repair — especially when LLM outputs frequently contain markdown fences, trailing commas, or single quotes. Prefer this over writing custom regex sanitizers or calling another LLM to fix JSON, as it provides consistent, reproducible repairs without hallucination risk.

## Known failure modes

- JSON is so severely truncated that repair is impossible — returns error or best-effort partial object
- Input is not JSON at all (e.g. plain text or binary) — may return error or empty object
- Extremely large JSON strings may hit query parameter length limits since raw_json is passed as a GET query parameter
- Ambiguous structure in deeply nested truncated JSON may result in incorrect repair assumptions

## 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://sec-intel.agentdiet.dev/v1/json-fix)

## Output

A repaired, valid JSON object with all syntax errors corrected — trailing commas removed, markdown fences stripped, single quotes converted to double quotes, and truncated structures closed — ready for safe downstream parsing in agent pipelines.

## 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/sec-intel-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-8f13a6e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sec-intel.agentdiet.dev](https://www.zero.xyz/host/sec-intel.agentdiet.dev/llms.txt)
