...
1# This is an example TOML document which shows most of its features.
2
3# Simple key/value with a string.
4title = "TOML example \U0001F60A"
5
6desc = """
7An example TOML document. \
8"""
9
10# Array with integers and floats in the various allowed formats.
11integers = [42, 0x42, 0o42, 0b0110]
12floats = [1.42, 1e-02]
13
14# Array with supported datetime formats.
15times = [
16 2021-11-09T15:16:17+01:00, # datetime with timezone.
17 2021-11-09T15:16:17Z, # UTC datetime.
18 2021-11-09T15:16:17, # local datetime.
19 2021-11-09, # local date.
20 15:16:17, # local time.
21]
22
23# Durations.
24duration = ["4m49s", "8m03s", "1231h15m55s"]
25
26# Table with inline tables.
27distros = [
28 {name = "Arch Linux", packages = "pacman"},
29 {name = "Void Linux", packages = "xbps"},
30 {name = "Debian", packages = "apt"},
31]
32
33# Create new table; note the "servers" table is created implicitly.
34[servers.alpha]
35 # You can indent as you please, tabs or spaces.
36 ip = '10.0.0.1'
37 hostname = 'server1'
38 enabled = false
39[servers.beta]
40 ip = '10.0.0.2'
41 hostname = 'server2'
42 enabled = true
43
44# Start a new table array; note that the "characters" table is created implicitly.
45[[characters.star-trek]]
46 name = "James Kirk"
47 rank = "Captain"
48[[characters.star-trek]]
49 name = "Spock"
50 rank = "Science officer"
51
52[undecoded] # To show the MetaData.Undecoded() feature.
53 key = "This table intentionally left undecoded"
View as plain text