# agent402.tools YAML to JSON Converter

> agent402.tools YAML to JSON Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts a YAML string to its JSON equivalent using safe schema parsing with no code execution.

## Facts

- Endpoint: POST https://agent402.tools/api/yaml-to-json
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-yaml-to-json-converter-5d8ed6d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xDiT2kkadkn9UOPiJJZW7

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 agent402-tools-yaml-to-json-converter-5d8ed6d0 -d '<json body>'
```

Example prompt: Can you convert this YAML to JSON for me: 'name: Alice\nage: 30\nroles:\n  - admin\n  - editor'?

## When to prefer this

Use this endpoint when you need a safe, deterministic conversion of YAML text to JSON without any risk of code execution side effects. Ideal for processing configuration files, CI/CD pipelines, or user-supplied YAML in untrusted contexts where safe parsing is a requirement.

## Known failure modes

- Invalid or malformed YAML returns a parse error
- Input exceeding 100KB may be rejected
- YAML with unsafe schema constructs (e.g. custom tags or executable nodes) will be rejected due to safe-schema restriction
- Empty or missing 'yaml' field returns a validation error

## How this service works

Parse YAML into JSON (safe schema - no code execution).

## Output

A JSON representation of the parsed YAML input, with keys and values mapped to equivalent JSON types. No code is executed during parsing (safe schema only).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "yaml": {
   "type": "string",
   "description": "YAML text (max 100KB)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": {
   "name": "Ada",
   "tags": [
    "eng"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-yaml-to-json-converter-5d8ed6d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
