You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inline tables provide a more compact syntax for expressing tables. They are especially useful for grouped data that can otherwise quickly become verbose. Inline tables are enclosed in curly braces { and }. Within the braces, zero or more comma separated key/value pairs may appear. Key/value pairs take the same form as key/value pairs in standard tables. All value types are allowed, including inline tables.
Inline tables are intended to appear on a single line. No newlines are allowed between the curly braces unless they are valid within a value. Even so, it is strongly discouraged to break an inline table onto multiples lines. If you find yourself gripped with this desire, it means you should be using standard tables.
name = { first = "Tom", last = "Preston-Werner" }
point = { x = 1, y = 2 }
The inline tables above are identical to the following standard table definitions:
[name]
first = "Tom"last = "Preston-Werner"
[point]
x = 1y = 2
The text was updated successfully, but these errors were encountered:
@emancu I can't find if they should be supported or not. In toml-lang/toml#235 pull request there was a discussion about them but didn't see the final answer.
I do not see a need for nested inline tables but it would be good if @mojombo could confirm and clarify TOML spec.
From TOML 0.4.0 specification:
Inline tables provide a more compact syntax for expressing tables. They are especially useful for grouped data that can otherwise quickly become verbose. Inline tables are enclosed in curly braces
{
and}
. Within the braces, zero or more comma separated key/value pairs may appear. Key/value pairs take the same form as key/value pairs in standard tables. All value types are allowed, including inline tables.Inline tables are intended to appear on a single line. No newlines are allowed between the curly braces unless they are valid within a value. Even so, it is strongly discouraged to break an inline table onto multiples lines. If you find yourself gripped with this desire, it means you should be using standard tables.
The inline tables above are identical to the following standard table definitions:
The text was updated successfully, but these errors were encountered: