Open dmbaturin opened 3 years ago
FYI @mcaruso85
I created. a PR to fix this issue.
There is no specification for mixed array in toml. So with this FIX when array is mixed, it behaves like before. If array is array of objects then it follows the spec to have the array of objects
So basically :
console.log(json2toml({"foo": [{"bar": false}, 9, true]})) foo = [{"bar":false},9,true]
For the record: I'm not actively using this library now, so I don't demand a quick fix, this is just FIY.
The new array of tables feature has an unhandled edge case related to mixed-type arrays. The
isObjectArrayOfTables
function reports a false positive when an array starts with a table but has values of different types in its tail.