Support Nested Inline Tables#297
Conversation
| val table2: Table2, | ||
| ) | ||
|
|
||
| val test = |
There was a problem hiding this comment.
Hm, it looks like deserialization should go in a little bit different way: toml-lang/toml#879
table2 = { table2."akuleshov7.com" = { name = "test" }, i = 1 }
is equal to the following one:
[table2]
i = 1
[table2.table2."akuleshov7.com"]
name = "test"
There was a problem hiding this comment.
So in Table2 class there should be another one table2 field
There was a problem hiding this comment.
Will be also great if you could add a test which deserializes the following code:
[table2]
i = 1
[table2.table2."akuleshov7.com"]
name = "test"
to same structures. Just to make it more obvious
There was a problem hiding this comment.
Thanks, brat! LGTM. Free to merge (don't forget to squash)
|
|
||
| @Test | ||
| @Ignore | ||
| fun decodeSimpleInlineTable() { |
There was a problem hiding this comment.
@BOOMeranGG can you please also add the second example:
table2 = { "akuleshov7.com" = { name = "test" }, i = 1 }
There was a problem hiding this comment.
Done in test fun decodeInlineTable()
4c65e1f to
01d8495
Compare
01d8495 to
bd19a11
Compare
Fixes #107
First problem was in
TomlInlineTable::parseInlineTableValue, when we called.split(","). It doesn't work with arrays (cause they also have comma) and with nested inline tables. Now we do the same split, but ignore all commas inside arrays/nested inline.Second problem was in

TomlInlineTable::returnTable, in test case we had this TomlTable fullTableKey: