toml-lang / toml.io

Source Code for toml.io
https://toml.io
MIT License
42 stars 44 forks source link

Mixed-type arrays are still invalid, aren't they? #3

Closed eksortso closed 5 years ago

eksortso commented 5 years ago

The example at the top of the page has the following two lines:

[clients]
data = [ ["delta", "phi"], 3.14159 ]

The problem is the value of data. which is a mixed-type array, which is invalid in TOML v0.5.0. Although there's an open issue regarding whether mixed-type arrays ought to be allowed, that issue is tagged post-1.0.

So assuming the issue isn't pressed before v1.0.0, do you think we need to remove or replace the mixed-type array from the lead example?

cannikin commented 5 years ago

I got it from this example in the README but tried to shorten it to fit the width of an iPhone X:

[clients]
data = [ ["gamma", "delta"], [1, 2] ]

If I just wrap my 3.14 in an array would we be good to go?

eksortso commented 5 years ago

That'd definitely do it. Array of arrays.

pradyunsg commented 5 years ago

Yea. Let's go with array of arrays here. The updated example above seems fine to me.

I'm gonna eagerly close this issue, since we have a resolution.