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