🍋
Menu
.toml Code

TOML (Tom's Obvious Minimal Language)

TOML ist ein Konfigurationsdateiformat, das auf Klarheit und Einfachheit ausgelegt ist. Es bildet eindeutig auf eine Hash-Tabelle ab und ist für Menschen leicht zu lesen und zu schreiben. TOML ist das Standardformat für Rusts Cargo.toml und Pythons pyproject.toml.

MIME-Typ

application/toml

Typ

Text

Komprimierung

Verlustfrei

Vorteile

  • + Unambiguous — no implicit type coercion unlike YAML
  • + Native datetime support without quoting
  • + Simple, flat structure that maps directly to hash tables
  • + Standard in Rust and Python ecosystems

Nachteile

  • Deeply nested data structures become verbose
  • Less widespread tool support compared to JSON and YAML
  • No standard way to represent null values

Wann Sie .TOML verwenden sollten

Verwenden Sie TOML für Konfigurationsdateien — insbesondere in Rust- (Cargo.toml) und Python-Ökosystemen (pyproject.toml). Ideal, wenn eindeutiges Parsing wichtig ist.

Technische Details

TOML verwendet Schlüssel-Wert-Paare, Tabellen (Abschnitte in eckigen Klammern), Arrays von Tabellen (doppelte eckige Klammern) und nativ typisierte Werte einschließlich Datum/Uhrzeit, Ganzzahlen, Gleitkommazahlen, Booleans und Zeichenketten. Einrückung ist nicht signifikant.

Geschichte

Tom Preston-Werner (Mitgründer von GitHub) schuf TOML im Jahr 2013 als minimale Alternative zu YAML und JSON für Konfigurationsdateien. TOML 1.0 wurde im Januar 2021 nach umfangreichem Community-Feedback veröffentlicht.

Von .TOML konvertieren

In .TOML konvertieren

Verwandte Formate

Verwandte Begriffe