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 Json.mapOfFrom(Class) to support binding POJO-valued maps #66

Closed
ocind opened this issue Sep 9, 2019 · 3 comments
Closed

Add Json.mapOfFrom(Class) to support binding POJO-valued maps #66

ocind opened this issue Sep 9, 2019 · 3 comments
Milestone

Comments

@ocind
Copy link

ocind commented Sep 9, 2019

Hi 'm wondering if Map<String, POJO> deserialization is currently supported by jackson-jr.
As far as I see, there is only mapFrom which returns Map<T,Object>

@cowtowncoder
Copy link
Member

Currently it is not supported and references to Map mean "untyped".

But since there actually is listOfFrom(), we could quite easily have mapOfFrom() to do this -- would that make sense? I think I could probably add this in 2.10, to be available relatively soon.

@cowtowncoder cowtowncoder changed the title [Guidance] Support for Map<String, POJO> deserialization Add Json.mapOfFrom(Class) to support binding POJO-valued maps Sep 9, 2019
@cowtowncoder cowtowncoder added this to the 2.10.0 milestone Sep 9, 2019
@ocind
Copy link
Author

ocind commented Sep 10, 2019

@cowtowncoder whoa! that's really fast! Thank you @cowtowncoder for the awesome work!!!

@cowtowncoder
Copy link
Member

Lucky timing :)

But thank you for pointing out the missing part -- it happened to be easy to add, too, given existing listOfFrom(). I am happy to get a few improvements in 2.10, to make jackson-jr much more useful: now one can add custom ValueReader s and ValueWriters too, opening door to 3rd party datatypes as well.

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

2 participants