Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Support for TOML#2

Open
popcron wants to merge 10 commits into
mainfrom
dev/toml-support
Open

Support for TOML#2
popcron wants to merge 10 commits into
mainfrom
dev/toml-support

Conversation

@popcron

@popcron popcron commented May 20, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@popcron

popcron commented May 21, 2025

Copy link
Copy Markdown
Contributor Author
  • inline tables
name = { first = "Tom", last = "Preston-Werner" }
point = { x = 1, y = 2 }
animal = { type.name = "pug" }
  • inline tables inside arrays
contributors = [
  "Foo Bar <foo@example.com>",
  { name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" }
]
  • keys encapsulated with quotes
"character encoding" = "value"
'key2' = "value"
'quoted "value"' = "value"
  • keys with dots should form tables
name = "Orange"
apple.type = "fruit"
apple.skin = "thin"
apple.color = "red"
orange.type = "fruit"
orange.skin = "thick"
orange.color = "orange"
site."google.com" = true
3.14159 = "pi"
  • table names with dots should be child tables
[x.y.z.w]
apple = "red"

[dog."tater.man"]
type.name = "pug"
  • table names with doubled square brackets should be array elements
[[fruits]]
name = "apple"

[fruits.physical]  # subtable
color = "red"
shape = "round"

[[fruits.varieties]]  # nested array of tables
name = "red delicious"

[[fruits.varieties]]
name = "granny smith"

[[fruits]]
name = "banana"

[[fruits.varieties]]
name = "plantain"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant