TOML

from Wikipedia, the free encyclopedia
TOML
File extension : .toml
MIME type : application / toml
Developed by: Tom Preston-Werner
Initial release: 02/23/2013
Current version: 1.0.0-rc.2 (as of 08/09/2020 )
Type: Data exchange
Extended by: JSON
Website : https://github.com/toml-lang/toml


TOML is a file format for configuration files with a focus on easy readability, which should be guaranteed by simplified semantics.

TOML aims to be easy to parse and unambiguously converted into an associative data field . The specification is open source , the project is maintained in particular by the community. The acronym TomL stands for " T om's O bvious, M inimally L anguage" which on Tom Preston-Werner , one of the GitHub -Mitgründer, refers. TOML is used by a number of software projects such as Cargo or GitLab and is already implemented in many programming languages.

syntax

The syntax of TOML is similar to that of .INI files and consists primarily of schluessel = "wert"-pairs, [Abschnittsnamen]and # Kommentaren.

According to the specification, the following data types are supported: String, Integer, Float, Boolean, Datetime, Array and Table.

example

# Das ist ein TOML-Dokument.
title = "TOML Beispiel"

[person]
name = "Tom Preston-Werner"
geburtstag = 1979-05-27T07:32:00-08:00

[datenbank]
adresse = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
verbindungen_max = 5000
aktiviert = true # booleans

[servers]

  # Einruecken (sowohl Tabs als auch Leerzeichen) ist erlaubt, aber nicht erforderlich
  [servers.alpha]
  ip = "10.0.0.1"
  dc = "eqdc10"

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

[clients]
data = [ ["gamma", "delta"], [1, 2] ]

# Zeilenumbrüche sind in Arrays moeglich
hosts = [
  "alpha",
  "omega"
]

Individual evidence

  1. Release 1.0.0-rc.2 toml-lang / toml GitHub
  2. GitHub - toml-lang / toml: Tom's Obvious, Minimal Language. Retrieved April 21, 2019 .
  3. Projects using TOML - TOML Wiki. Retrieved April 21, 2019 .
  4. ^ The Manifest Format - The Cargo Book. Retrieved April 21, 2019 .
  5. Implementations - TOML Wiki. Retrieved April 21, 2019 .