Toml: Trailing commas in arrays?

Created on 4 Oct 2014  路  2Comments  路  Source: toml-lang/toml

We know 'm from Ruby and Yml.
They make it _easier_ to remove a line from the end of the array (one potential annoyance less), and to have machine generated arrays.

To make it clear: I don't advocate for them. I like 'm when allowed.

In my opinion the TOML spec may explicitly mention if they're allowed or should result in a parse error.

Most helpful comment

Trailing commas are fine. The spec says it:

Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. Terminating commas are ok before the closing bracket. Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. Terminating commas are ok before the closing bracket.

All 2 comments

Trailing commas are fine. The spec says it:

Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. Terminating commas are ok before the closing bracket. Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. Terminating commas are ok before the closing bracket.

Sorry, I used the wrong name to search the docs. Thanks for replying.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tamasfe picture tamasfe  路  3Comments

jakwings picture jakwings  路  3Comments

jdfergason picture jdfergason  路  4Comments

uvtc picture uvtc  路  3Comments

clarfonthey picture clarfonthey  路  4Comments