-
-
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
JSOG usage of @JsonTypeInfo and @JsonIdentityInfo(generator=JSOGGenerator.class) implies failure for deserialization #669
Comments
May be related to the problem of injecting multiple metadata properties. But how does this fail? |
Hello, But when attempting to deserialize it fails because jacksson thinks that "inner1":{"@Class":"com.voodoodyne.jackson.jsog.JSOGTest$Inner","@id":"2","bar":"bar"} represents an objectid or reference stack trace : |
I created a PR that adds a failing test case: I'm not quite sure what is going on. I have a test case for this in the jsog-jackson code and it looks like jackson is trying to deserialize a ref, even the first time it sees the object (when it is a full object with id). But the failure in the PR above looks a little different. I suspect it has the same root cause. |
So the problem is due to interaction between type and object ids. Will need to see what to do with that. |
Turned out to be relatively easy to fix. Phew! For a while thought might be trickier. One thing that is clear, however, is that for more complex Object Ids (more than a single key/value pair), code would become a pretzel. But that's neither here nor now, so we're good for time being. :) |
Great job |
First happy new year to everybody !
Deserialization seems to work with JSOGGenerator. However when adding @JsonTypeInfo (need this in a model object that have superclass), it does not succeed to.
Sample to reproduce in JSOGTest.java :
@JsonIdentityInfo(generator=JSOGGenerator.class)
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@Class")
public static class Inner {
public String bar;
}
In a more global way, the @Class attribute does not seem to be handle or lead to a conflict with @ref management.
Does somebody succed to handle that ? thank you .
Sorry if double post in JSOG jackson plugin is too much (dunno wich is the best place to put/solve)
The text was updated successfully, but these errors were encountered: