mini-yaml
mini-yaml copied to clipboard
Adding at() or find()?
Thanks for providing such a wonderful tool.
I am using yaml only for input (and I guess this is the way yaml is used frequently). Currently, random visit is supported only by non-const operator [], which is not available for this purpose. Do you think it is worthwhile to add
const Node & at (const size_t index) const; const Node & at (const std::string & key) const;
Now I am implement this using const iterator, which is lengthy...
Regards
Hi @kuangdai, thank you for your input.
It's a great idea to add new const(and non-const) methods for retrieving nodes by their index or key. I'm currently refactoring the library and will start using branches and releases to mark and track the version of mini-yaml, because this library is becoming pretty popular. I'll make sure to implement this feature while refactoring, thank you.