-
Notifications
You must be signed in to change notification settings - Fork 7
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
nested maps #20
Comments
Seems like a nice library! It would definitely make the implementation of this one simpler. That said, I am a little reluctant to introduce a dependency and make this library less generally interoperable. I will give it a try and let you know what I think. |
Unfortunately it does not seem to work in Octave, and does not support assigning cell arrays as values, which is a pretty important feature for TOML. I will see if I can adapt it to work for this use case. For now at least, |
At least in standard matlab,
This probably goes against the spirit of your upgrade, but to get around this issue and to not have to change my previously written code, I am just converting the map back to a struct. As a solution this works fine for me:
|
I could include that utility in the library if you'd like. The main reason for using Map is that TOML supports keys that are not valid field/variable names in MATLAB. Providing a function to translate to a more usable format (and fix those names in the process) makes sense for a library like this. |
Up to you! I understand the rationale. Thanks for making this - I was using json before and this is much cleaner. |
Just a thought, but I wonder if you could integrate something like this?
https://github.com/RolandRitt/Matlab-NestedMap
I wasn't aware of matlab's map type, but it's a little annoying for accessing nested data as far as I can tell:
Used to be you could do:
c = cfg.a.b.c
Now you need to do
to achieve the same thing.
The text was updated successfully, but these errors were encountered: