-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Arrays of Tables #88
Comments
@NfNitLoop Thank you for this issue, I will pin it. I actually planned to start from it right now :) |
A link for the SPEC: https://toml.io/en/v1.0.0#inline-table What should we pay attention on:
|
Difficult part here is to understand how to represent such structure in a tree. I suppose that we need to do the following:
|
Finally added the support for parsing of arrays of tables: #104 |
@akuleshov7 so what's still missing for array of tables to work ? |
decoding process. I have added parsing, added tree structures, only decoding is missing now |
@akuleshov7 any progress on decoding these? Just ran into this in my project |
I'm interested in parsing |
Oh, I missed that question, sorry. Yes, this is a blocker and we will take it as the highest priority. As I didn't know that Cargo has arrays of tables. Will take it into 0.6.0 release, as previously we thought that multiline arrays/strings and streaming had more priority and were focused on that. This one is a very long story and I hope to finish it in the nearest months. |
Thanks for prioritizing this! |
I am also patiently waiting for this feature! 🙂 |
This is also a blocker for my use case, can you provide a rough timeline on when we can expect the new release? |
ktoml is community project, driven only by several people, so probably there are some time difficulties in supporting it. But you can also contribute and collaborate if it is a hard stopper for you, we will appreciate it 🙏 My personal estimation was to make it last month, but still did not get a chance for it. I will be on vacation next week, so probably I will give it a try… |
For anyone who needs this, I think a temporary workaround is to use TomlJ to convert the toml to json and then decode as json. Theoretically this should be very simple to swap for ktoml once it is ready. |
I see this is already called out as a feature that's not yet implemented in the README:
I just wanted to make a ticket for it so folks can vote for it, and so I can get notified when it's implemented. (It's currently a blocker for my use case.)
My use case is this:
I want to support multiple configuration environments in one file. Like:
But that currently gives an error:
Alternatively, I also tried a "Map of Tables" approach like this, but that didn't work either:
Error:
The text was updated successfully, but these errors were encountered: