Data Transform
TOML <-> JSON API
Converts a TOML subset (tables, key/value, arrays, quoted strings) to JSON, or JSON back to TOML. Answers 'How do I convert TOML to JSON (or back)?', 'How do I parse a Cargo/pyproject-style config?'.
Price$0.02per request
MethodPOST
Route/v1/data-transform/toml-json
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformtomljsonconvertconfigparsewrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/toml-jsonExample request
{
"data": "title = \"x\"\n\n[owner]\nname = \"Ada\"\nage = 36",
"direction": "toml-to-json"
}Example response
{
"direction": "toml-to-json",
"result": {
"title": "x",
"owner": {
"name": "Ada",
"age": 36
}
}
}Input schema
{
"type": "object",
"required": [
"data",
"direction"
],
"properties": {
"data": {
"type": "string",
"examples": [
"title = \"x\"\n\n[owner]\nname = \"Ada\"\nage = 36"
]
},
"direction": {
"type": "string",
"examples": [
"toml-to-json"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}