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

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

Closed
cowtowncoder opened this issue Jun 9, 2015 · 0 comments
Closed
Milestone

Comments

@cowtowncoder
Copy link
Member

Reading a subset of a document, binding it, is quite possible to do already. For example by:

JsonNode tree = mapper.readTree(source);
JsonNode node = tree.at("/caller/1/name");
POJO value = mapper.treeToValue(node, POJO.class);

But it would be even more convenient (and, potentially, more efficient) to make ObjectReader find the JSON Pointer location using new (2.6) streaming filter, and bind directly from there.

Something like:

POJO value = mapper.reader(POJO.class)
    .at("/caller/1/name")
    .readValue(source);
islanderman pushed a commit to islanderman/jackson-databind that referenced this issue Jul 16, 2015
islanderman pushed a commit to islanderman/jackson-databind that referenced this issue Jul 16, 2015
islanderman pushed a commit to islanderman/jackson-databind that referenced this issue Jul 16, 2015
islanderman pushed a commit to islanderman/jackson-databind that referenced this issue Jul 16, 2015
islanderman pushed a commit to islanderman/jackson-databind that referenced this issue Jul 16, 2015
@cowtowncoder cowtowncoder added this to the 2.6.0 milestone Jul 17, 2015
cowtowncoder added a commit that referenced this issue 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

No branches or pull requests

1 participant