mayah / tinytoml

A header only C++11 library for parsing TOML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with nested array

quantizz opened this issue · comments

Hello! I’m trying to parse nested arrays but without success.
Example:

[[widgets]]
type = "image"
width = 1000

[[widgets.topics]]
topic = "some"
count = 3

[[widgets.topics]]
topic = "something"
count = 4

I am getting "Error: line 27: error when parsing group key" when I check if it's valid.
Line 27 in my toml file is "topic = "some"".

commented

Thanks for the error report. I'll check it soon

commented

Hmm, I've added the same test case, but succeeded.
fb52557

Could you check your toml file again?
The error message is "error when parsing group key", so probably your group key ([foo] or [[foo]]) might have an invalid format. Could you check line 27, line 26, or group key before line 27?

If you can provide your entire toml file, I might be able to check more.

Thank you very much for being so quick in responding to the issue.
I tested with your test toml file and I still got the same error. The problem was with my tinytoml.h file that was from June. I upgraded to the most recent version and the error is gone. Should have looked at that first.

Thank you again.