Skip to content
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

Adding at() or find()? #6

Open
kuangdai opened this issue Sep 1, 2019 · 1 comment
Open

Adding at() or find()? #6

kuangdai opened this issue Sep 1, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@kuangdai
Copy link

kuangdai commented Sep 1, 2019

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

@jimmiebergmann
Copy link
Owner

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.

@jimmiebergmann jimmiebergmann added the enhancement New feature or request label Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants