At its heart, TOML is all about key-value pairs. This is the simplest TOML file you can create:
message = "Hello World"
Here, the key message has the "Hello World" value. A value can also be an array:
messages: ["Hello", "World", "out", "there"]
A group of key-values is called a table. The following TOML lets the smileys table contain the happy key with the ":)" value and the sad key with the ":(" value:
[smileys]
happy = ":)"
sad = ":("
A particularly small table can be inlined, that is, written in one line. The last example is the exact same as the following:
smileys = { happy = ":)", sad = ":(" }
Tables can be nested by separating their names with a dot:
[servers]
[servers.production]
ip = "192.168.0.1"
[servers.beta]
ip = "192.169.0.2"
[servers.testing]
ip = "192.169.0.3"
A nice property of TOML is that...