-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Convert POJO to JsonNode using a JsonView (via valueToTree?) #1687
Comments
Hmmh. Ideally I think conversion functionality could be exposed either via So I'll have to think of what to do here: adding just this one method may be fine. |
@cowtowncoder Thanks for your reply. If you could add just this one method that would be great. I have been working heavily with jackson but actually this was the only limitation I was facing so far. |
Any chance this will be fixed soon? |
No, I don't think so. It sounds like something that could be done for 3.0, so could be implemented in near future (if anyone has time for it, I don't). But would take a while to get released just because 3.0 (major API compatiblity breaking) is quite a way out. But I think this would be good addition, potentially, if I understand it right. |
Hey! Any news on this one? Do you think it's hard to implement this in upcoming version 3? |
@mkurz The main challenge is that there are so many things to work on, even on my "short list" of immediate work (https://github.com/FasterXML/jackson-future-ideas/wiki/Jackson-Work-in-Progress). I don't think it would necessarily be difficult to do, although that depends on details. I'll add it to "simple" list of features for 3.x. |
Right now it is not possible to apply a view to
mapper.valueToTree(fromValue)
.It would be nice to have an overloaded version like
mapper.valueToTree(fromValue, MyView.class)
(or similar).As a workaround right now I use:
to apply a view to an object I want to convert to a
JsonNode
.Is there a better way to solve this?
Also have a look at this SOF discussion: https://stackoverflow.com/q/23006241/810109
The text was updated successfully, but these errors were encountered: