You're adopting Rust or Python packaging conventions and want your config in Cargo.toml/pyproject.toml style — but your data starts life as JSON from an API or an export. Here's how to convert it cleanly.
transmute$ cat config.json | transmute --to toml name = "my-app" version = "2.0" retries = 3
The format is auto-detected on input, so there are no flags to argue with. Nested objects become TOML sections ([server.tls]), scalars keep their types, and strings are escaped per the TOML spec.
dasel$ dasel convert -r json -w toml < config.json
dasel handles many formats both ways. It's a solid alternative if you already have Go installed; otherwise a single static binary like Transmute is quicker to set up.
import json, tomli_w data = json.load(open("config.json")) with open("config.toml", "wb") as f: tomli_w.dump(data, f)
tomli_w writes TOML fast and correctly. One caveat: Python dicts must be converted to TOML-compatible types first — tuples work as arrays, sets don't.
items = [1, "two"]) but some round-trips through other tools will coerce types.null must become an omitted key, an empty string, or a sentinel value — pick deliberately.{"a.b": 1} needs quoting in TOML ("a.b" = 1) or it silently becomes section [a]. Good generators quote; naive ones corrupt.tomli_w for direct file writing.Transmute runs the conversion on your machine — paste it in, or script it from the command line. JSON, YAML, CSV, TOML and XML, fully offline.
Get Transmute Desktop — $19 one-time → Or use the free web converter