TOML explained

TOML
Icon Size:32
Extension:.toml
Mime:application/toml (Not registered)
Nomimecode:on
Open:Yes
Genre:Data interchange

Tom's Obvious, Minimal Language (TOML, originally Tom's Own Markup Language[1]) is a file format for configuration files.[2] It is intended to be easy to read and write due to obvious semantics which aim to be "minimal", and it is designed to map unambiguously to a dictionary. Originally created by Tom Preston-Werner, its specification is open source. TOML is used in a number of software projects[3] [4] and is implemented in many programming languages.[5]

Syntax

TOML's syntax primarily consists of key = value pairs, [section names], and # (for comments). TOML's syntax somewhat resembles that of .INI files, but it includes a formal specification, whereas the INI file format suffers from many competing variants.

Its specification includes a list of supported data types: string, integer, float, boolean, datetime, array, and table.

Example

  1. This is a TOML document.

title = "ImpalaPay Co."

[database]server = "192.168.1.1"ports = [8000, 8001, 8002 ]connection_max = 5000enabled = true

  1. Line breaks are okay when inside arrays

hosts = ["alpha", "omega" ]

[servers]

# Indentation (tabs and/or spaces) is allowed, but not required [servers.alpha] ip = "10.0.0.1" dc = "eqdc10"

[servers.beta] ip = "10.0.0.2" dc = "eqdc10"

Use cases

TOML is used in a variety of settings (some related to its creator), such as:

Criticism

TOML has been criticized on a number of points:

Notes and References

  1. Web site: Preston-Werner . Tom . 2013-02-24 . Initial commit · toml-lang/toml@84db252 . live . https://web.archive.org/web/20240615191325/https://github.com/toml-lang/toml/commit/84db252ed19561ef6f966cb3e470f04b32800add . 2024-06-15 . 2024-06-15 . GitHub.
  2. Web site: Preston-Werner . Tom . Tom Preston-Werner . Gedam . Pradyun . January 11, 2021 . TOML: English v1.0.0 . January 27, 2024 . January 29, 2024 . https://web.archive.org/web/20240129045431/https://toml.io/en/v1.0.0 . live .
  3. Web site: My wish-list for the next YAML . Drew . DeVault . 2021-07-28 . YAML is both universally used, and universally reviled. It has a lot of problems, but it also is so useful in solving specific tasks that it’s hard to replace. Some new kids on the block (such as TOML) have successfully taken over a portion of its market share, but it remains in force in places where those alternatives show their weaknesses. . 2021-07-28 . 2024-03-09 . https://web.archive.org/web/20240309125915/https://drewdevault.com/2021/07/28/The-next-YAML.html . live .
  4. Web site: TOML: Tom's Obvious Minimal Language . 2022-08-08 . toml.io . 2022-08-08 . https://web.archive.org/web/20220808093947/https://toml.io/en/ . live .
  5. Web site: 23 May 2022 . toml-lang/toml . GitHub . 16 December 2016 . 15 February 2017 . https://web.archive.org/web/20170215183959/https://github.com/toml-lang/toml . live .
  6. Web site: tomllib — Parse TOML files . 2023-07-08 . Python documentation . 2024-06-11 . https://web.archive.org/web/20240611135426/https://docs.python.org/3/library/tomllib.html . live .
  7. Web site: The Manifest Format - The Cargo Book . 2023-07-08 . doc.rust-lang.org . 2019-08-26 . https://web.archive.org/web/20190826013342/https://doc.rust-lang.org/cargo/reference/manifest.html . live .
  8. Web site: 10. Project.toml and Manifest.toml · Pkg.jl . 2023-07-08 . pkgdocs.julialang.org . 2023-07-08 . https://web.archive.org/web/20230708105355/https://pkgdocs.julialang.org/v1/toml-files/ . live .