# MoneyTools XML ↔ JSON Converter

> MoneyTools XML ↔ JSON Converter is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Converts XML text to JSON or JSON to XML, with auto-detection of direction and optional root element naming.

## Facts

- Endpoint: POST https://tools.moneytools.dev/v1/xml-json?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-xml-json-converter-8c59cb33
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VPQ__wnnJkM9-10A5ucK6

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 moneytools-xml-json-converter-8c59cb33 -d '<json body>'
```

Example prompt: Can you convert this XML into JSON for me: <note><to>AI</to><body>hello world</body></note>?

## When to prefer this

Use this endpoint when you need a lightweight, cheap ($0.001 per call) serverless XML↔JSON conversion without standing up your own parser. Ideal for agents processing XML-based APIs, RSS/Atom feeds, SOAP responses, or config files that need to be interoperable with JSON-native systems. Auto-detection of direction makes it convenient when the format is already known from context.

## Known failure modes

- Malformed XML input causes parse error and returns error response
- Invalid JSON input causes serialization failure
- Ambiguous direction when input is neither valid XML nor JSON
- Deeply nested or very large documents may hit size limits
- Missing rootName when converting bare JSON primitives to XML

## How this service works

Catalog of MoneyTools: 116 cheap, read-only tools for AI agents. Free daily tier, then x402 USDC micropayments or prepaid credits. Token safety, approvals, tx decoding, EIP-712 risk, gas, ENS, x402 validation, DNS, RDAP, JSON Schema, time, FX.

## Output

A JSON response containing the converted data — either a structured JSON object (when converting from XML) or an XML string (when converting from JSON). The conversion is bidirectional and direction can be auto-detected or explicitly specified.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "examples": [
    "<note><to>AI</to><body>hi</body></note>"
   ],
   "description": "XML text or JSON text"
  },
  "rootName": {
   "type": "string",
   "examples": [
    "root"
   ],
   "description": "wrap JSON value under this element name"
  },
  "direction": {
   "type": "string",
   "description": "xml-to-json | json-to-xml (auto)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": {
   "note": {
    "to": "AI",
    "body": "hi"
   }
  },
  "note": "Attributes prefixed with @_. No external entities fetched (SSRF-safe).",
  "direction": "xml-to-json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-xml-json-converter-8c59cb33/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.moneytools.dev](https://www.zero.xyz/host/tools.moneytools.dev/llms.txt)
