# TOML to JSON Converter

> TOML to JSON Converter is a paid API for AI agents from toolshed.lemon-agent.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Converts a TOML document into pretty-printed JSON, correctly handling dotted keys, arrays of tables, and offset date-times.

## Facts

- Endpoint: POST https://toolshed.lemon-agent.dev/convert/toml-json
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toml-to-json-converter-f849f444
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ATX8kmQW-9LK-iCIuT39z

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 toml-to-json-converter-f849f444 -d '<json body>'
```

Example prompt: Convert this TOML config file to JSON for me — it has some dotted keys and a few date fields that need to come out as ISO-8601 strings.

## When to prefer this

Choose this endpoint when you need a spec-conforming TOML parser rather than a hand-rolled reader — especially when your TOML uses dotted keys, arrays of tables, or offset date-times that simpler parsers get wrong. Ideal for config files like Cargo.toml, pyproject.toml, or any structured TOML document you need to process as JSON.

## Known failure modes

- Malformed TOML input returns a parse error response
- Input exceeding 256 KB is rejected
- Non-TOML content sent as body will fail parsing
- Duplicate keys that are invalid TOML will be rejected by the conforming parser

## How this service works

TOML to JSON. POST a TOML document; the response is pretty-printed JSON. A conforming parser handles the parts hand-rolled readers get wrong — dotted keys, arrays of tables, offset date-times. Dates become ISO-8601 strings and comments are dropped, because JSON has neither; this is a read path, not a round trip.

## Output

A pretty-printed JSON representation of the submitted TOML document. Dates become ISO-8601 strings, comments are stripped (JSON has no comment syntax), dotted keys are expanded correctly, and arrays of tables are represented as JSON arrays of objects.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "string",
     "maxLength": 262144,
     "description": "the raw TOML file as the request body, up to 256 KB"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "const": "POST"
    },
    "bodyType": {
     "type": "string",
     "const": "text"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "format"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "text"
    },
    "format": {
     "type": "string",
     "const": "application/json",
     "description": "the converted JSON file as the response body (application/json)"
    },
    "example": {
     "type": "string",
     "description": "the sample request body above, converted — what a the converted JSON file as the response body (application/json) looks like"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toml-to-json-converter-f849f444/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolshed.lemon-agent.dev](https://www.zero.xyz/host/toolshed.lemon-agent.dev/llms.txt)
