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

Support adding any two paths to the same extractor #20

Open
tgregg opened this issue Oct 28, 2020 · 0 comments
Open

Support adding any two paths to the same extractor #20

tgregg opened this issue Oct 28, 2020 · 0 comments

Comments

@tgregg
Copy link
Contributor

tgregg commented Oct 28, 2020

Currently, the extractor provides a regular IonReader to callback invocations. This leads to the possibility that users can advance the reader during the callback without the extractor's knowledge. If the reader is advanced past a path that would have matched, the user will not receive that match. The documentation warns against doing this.

We may be able to support this by creating an internal implementation of the IonReader interface that contains a reference to the path extractor and the underlying IonReader. The implementation would intercept the IonReader API calls from the user, giving the path extractor the opportunity to evaluate for matches and fire additional callbacks.

It's possible there's some fatal flaw in this idea, as I haven't thought too deeply about it, but at a high-level it seems feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant