# JSON to XML Converter

> JSON to XML Converter is a paid API for AI agents from x402render-u5vwpxpyua-uc.a.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Converts a JSON object (as a string) into an XML document, with an optional custom root element name

## Facts

- Endpoint: POST https://x402render-u5vwpxpyua-uc.a.run.app/json-to-xml
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-to-xml-converter-a5cc4b04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mTq9ElwrAUt_M2l4V6d4I

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 json-to-xml-converter-a5cc4b04 -d '<json body>'
```

Example prompt: Convert this JSON string to XML with 'catalog' as the root element: '{"item":{"id":"1","name":"Widget","price":"9.99"}}'

## When to prefer this

Use this endpoint when you need a quick, pay-per-call JSON-to-XML conversion without setting up a local library or dependency. Ideal for agents integrating with legacy systems, SOAP services, or any XML-only partner APIs that require transformed input from modern JSON-based sources.

## Known failure modes

- Invalid or malformed JSON string in 'data' field returns an error
- Missing required 'data' field causes a bad request error
- Deeply nested or complex JSON structures may produce unexpected XML nesting
- JSON arrays may not serialize cleanly into XML without special handling
- Non-string values in JSON may require type coercion for valid XML

## How this service works

Convert a JSON object to XML

## Output

Returns an XML-formatted string representing the input JSON object, wrapped in the specified root element (or a default root if not provided). The output is a well-formed XML document that mirrors the structure and values of the input JSON.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "description": "object"
  },
  "root": {
   "type": "string",
   "description": "string (optional)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-to-xml-converter-a5cc4b04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402render-u5vwpxpyua-uc.a.run.app](https://www.zero.xyz/host/x402render-u5vwpxpyua-uc.a.run.app/llms.txt)
