# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from hn-pulse.agentdiet.dev, paid per call via MPP, $0.002/call, status unknown (last checked 2026-11-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: POST https://hn-pulse.agentdiet.dev/v1/malformed-json-healer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Provider: hn-pulse.agentdiet.dev
- Website: https://hn-pulse.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-fc4f1c4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bLhJnnf5T14jor1RcR4lV

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 hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-fc4f1c4b -d '<json body>'
```

Example prompt: This JSON string came back from an LLM and it has trailing commas and markdown code fences — can you repair it into valid JSON so I can pass it to the next step in my pipeline? Here's the raw string: ```{"name": "Alice", "age": 30,}```

## When to prefer this

Choose this endpoint when a multi-agent or LLM pipeline receives JSON that may be truncated, wrapped in markdown fences, contain trailing commas, or use single quotes — especially when you need deterministic (rule-based, not generative) repair to avoid non-deterministic re-generation. Ideal for production agent pipelines where reliability and low latency matter more than creative reconstruction.

## Known failure modes

- Input string is so severely malformed it cannot be deterministically repaired — returns error with explanation
- Empty or whitespace-only input string — returns validation error
- Input that is not JSON at all (e.g. plain English prose) — may return error or unexpected result
- Extremely long truncated JSON where the missing portion cannot be inferred — partial repair or error

## 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://hn-pulse.agentdiet.dev/v1/malformed-json-healer)

## Output

A valid, repaired JSON object that has had malformations such as trailing commas, markdown code fences, single quotes, and truncation corrected, ready for downstream parsing or agent consumption.

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