[[fruit.blah]]
name = "apple"
[fruit.blah.physical]
color = "red"
shape = "round"
[[fruit.blah]]
name = "banana"
[fruit.blah.physical]
color = "yellow"
shape = "bent"
From my reading of the toml spec, that should work, and give rise to the following JSON:
{
"fruit":{
"blah":[
{
"name":"apple",
"physical":{
"color":"red",
"shape":"round"
}
},
{
"name":"banana",
"physical":{
"color":"yellow",
"shape":"bent"
}
}
]
}
}
And tomlv accepts it:
$ tomlv -types fruit.toml ~
fruit.blah ArrayHash
fruit.blah.name String
fruit.blah.physical Hash
fruit.blah.physical.color String
fruit.blah.physical.shape String
fruit.blah ArrayHash
fruit.blah.name String
fruit.blah.physical Hash
fruit.blah.physical.color String
fruit.blah.physical.shape String
However attempting to parse with htoml gives Cannot redefine table ('fruit, blah, physical'.
From my reading of the toml spec, that should work, and give rise to the following JSON:
{ "fruit":{ "blah":[ { "name":"apple", "physical":{ "color":"red", "shape":"round" } }, { "name":"banana", "physical":{ "color":"yellow", "shape":"bent" } } ] } }And
tomlvaccepts it:However attempting to parse with htoml gives
Cannot redefine table ('fruit, blah, physical'.