-
Notifications
You must be signed in to change notification settings - Fork 97
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
Value Iteration #970
Comments
This could be implemented in an example first. What is the motivating use-case? |
Why specifically depth-first? Why not breadth-first? What's the use case? I agree with Vinnie, this sounds like an example. |
We use JSON values as the configuration object for programs. Sometimes, it is nice to list all the hierarchical key-value pairs flatly. I agree that this could be a good
But more importantly, iteration support would make it easier to use Depth-first is the most natural choice for me. I know there are multiple options to drive the iteration but one must be the default. |
@doganulus I think you should write it as an example contribution to Boost.JSON |
Ok, so I am interested in this in a form of an example. I'm not exactly sold on this being general-purpose enough to be added to the library proper. BTW, have you thought about integration with Boost.Graph? |
I would like to start a discussion on having a class of
value_iterator
, which will be used to iterate over avalue
instance like visiting a tree in a depth-first manner.Currently, we can iterate over
array
andobject
but I think a more general iterate functionality will be helpful for many applications. Also it would be nice thatvalue
supports generic iteration like other container classes.I prefer each iteration to return a key-value pair of a JSON Pointer and value reference but I would like to ask your opinion regarding it and whether we can utilize the already implemented mechanisms/structures in the library.
The text was updated successfully, but these errors were encountered: