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

Conversation

@popcron
Copy link
Contributor

@popcron popcron commented May 20, 2025

No description provided.

@popcron
Copy link
Contributor Author

popcron commented May 21, 2025

  • 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.

2 participants