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 convenience methods for creating List, Map valued ObjectReaders (ObjectMapper.readerForListOf()) #2693

Closed
cowtowncoder opened this issue Apr 24, 2020 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

One case where helper class TypeReference is often needed is for code like:

List<ValueType> values = mapper.readerFor(new TypeReference<ValueType>() { })
    .readValue(source);

and similarly for Maps. It should be easy to allow a short-cut like:

List<ValueType> values = mapper.readerForListOf(Value.class)
    .readValue(source);
Map<String, ValueType> valueMap = mapper.readerForMapOf(Value.class)
   .readValue(otherSource);

similar to what jackson-jr exposes.

@cowtowncoder cowtowncoder added this to the 2.11.0 milestone Apr 24, 2020
@cowtowncoder cowtowncoder changed the title Add convenience methods for creating Map, List ObjectReaders Add convenience methods for creating List, Map valued ObjectReaders (ObjectMapper.readerForListOf()) Apr 24, 2020
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