Skip to content

Add new method for ObjectReader to bind from JSON Pointer position #866

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

Merged
merged 2 commits into from
Jul 17, 2015

Conversation

islanderman
Copy link

Implement #820

Outline

Add two APIs as part of the change:

public ObjectReader at(final JsonPointer pointer)
public ObjectReader at(final String value)

Implementation

Add filter to be consider for JsonParser. Default value to be null as filter not considered.

private TokenFilter _filter;

Add unit test cases for the change. All unit test cases are passing.

@cowtowncoder
Copy link
Member

Looks good to me, thank you for contributing this!

The only change that will be needed is to make _filter final, to keep ObjectReader immutable; that is how all current configurability works. It is bit cumbersome to support (needing changes to constructors), but it is the approach taken to ensure 100% thread-safety via immutability.

@islanderman
Copy link
Author

Thanks for the comment. I also added more test cases and followed your naming convention.

@cowtowncoder cowtowncoder added this to the 2.6.0 milestone Jul 17, 2015
@cowtowncoder
Copy link
Member

Most excellent, thank you for implementing the feature!

cowtowncoder added a commit that referenced this pull request Jul 17, 2015
Add new method for ObjectReader to bind from JSON Pointer position
@cowtowncoder cowtowncoder merged commit 66fbf33 into FasterXML:master Jul 17, 2015
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

Successfully merging this pull request may close these issues.

2 participants