Trading Braces for [Brackets]: JSON Meets TOML
This one comes up when config moves out of a JSON file and into pyproject.toml, Cargo.toml, or a Hugo site config. TOML is built for people to edit: it allows comments, skips the brace counting and trailing-comma errors, and turns nested objects into [section] headers and arrays of objects into [[double-bracket]] tables.
Watch three things. TOML has no null, so null values have to be dropped or replaced with something you choose. A JSON file whose root is an array has no direct TOML equivalent, because a TOML document must be a table at the root. And dates stored as JSON strings stay strings unless you change them to TOML's native datetimes.
What are JSON and TOML?
JSON: structured data used by most web applications
TOML: fmt.toml
How it works
- Choose your JSON file.
- Check that TOML is selected and press convert.
- Download your new file. We delete both files automatically.
