TOML Cheat Sheet

Here’s a TOML (Tom’s Obvious Minimal Language) cheat sheet:

Basic Structure

# This is a comment

title = "My TOML Document"
author = "Your Name"

Data Types

String:

message = "Hello, TOML!"

Integer:

age = 25

Float:

pi = 3.14

Boolean:

is_active = true

Arrays

Inline Array:

fruits = ["apple", "orange", "banana"]

Multiline Array:

animals = [
  "lion",
  "tiger",
  "cheetah"
]

Tables

Simple Table:

[person]
name = "John"
age = 30

Nested Table:

[company]
name = "ABC Corp"

[company.address]
city = "New York"

Key-Value Pairs

Basic Key-Value:

key = "value"

Key with Special Characters:

special_key = "Special Value"

Comments

Inline Comment:

temperature = 25 # This is a comment

Datetime

Date:

birthdate = 1997-12-20

Time:

meeting_time = 12:30:00

Table Array

Table Array Example:

[[fruits]]
name = "apple"
color = "red"

[[fruits]]
name = "banana"
color = "yellow"

This cheat sheet covers the basic syntax and structure of TOML. You can adjust and expand it based on your specific use case and requirements.