You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very much a code smells issue, not a user facing feature.
There's quite a bit of code and complexity devoted to added root references to objects after they are received. I've thought about various class structures to clean the up, but really the right thing to do seems to be using the @JacksonInject annotation. We'd add the root instance to the mapper when reading and let the injector handle the assignment.
After some attempt at this I found that some parts of the project depend on the late binding behavior or provided by the current wrap* methods.
The root field is generally safe to bind early (it alway is preset before the query starts) but aside from that many owners have scenarios in which they are not available until late or are even optional.
It might be possible to create a Binding class that would hold these reference an allow them to be resolved later, but I'm not sure how useful that is.
Also, the @JacksonInject entries must preset in the InjectableValues or else the reader throws, making optional/late binding even more of a pain. This may not be worth the effort.
This is very much a code smells issue, not a user facing feature.
There's quite a bit of code and complexity devoted to added
root
references to objects after they are received. I've thought about various class structures to clean the up, but really the right thing to do seems to be using the@JacksonInject
annotation. We'd add theroot
instance to the mapper when reading and let the injector handle the assignment.See https://fasterxml.github.io/jackson-databind/javadoc/2.9/com/fasterxml/jackson/databind/ObjectMapper.html#reader-com.fasterxml.jackson.databind.InjectableValues-
The text was updated successfully, but these errors were encountered: