Here is my SO post describing the problem i am facing.
https://stackoverflow.com/questions/59602625/jackson-serialization-jsonproperty-conflicts-with-another-getter
Details.
I upgraded Spring 4.3 to Spring 5.2. The Jackson library also got upgraded
from 2.8.3 to 2.10.
I am experiencing the following problem with Serialization
Currently (in 2.8.3) when i apply the JsonView "D.class" and serialize
SubClass.java, i see "title" as a json property in the response. After
upgrading to 2.10, I do not see "title" in the reponse. It seems like it
does not like the fact that there is a getter method in the SuperClass as
getTitle. If i change the JsonProperty from "title" to "title1", it works.
I am now wondering how it worked fine in Jackson 2.8.3. Could it be
possible that the JsonView (D. class) is not getting applied properly in
2.10 causing Jackson to see both the getter Methods as a conflict?
public class SuperClass {
@JsonView({A.class, B.class})
public String getTitle(){}
}
public class SubClass extends SuperClass {
@JsonView({A.class, B.class, C.class, D.class})
@JsonProperty("title")
public String getArticleTitle(){}
}
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/72f59a61-8933-4fc3-9f6d-0008f3d5309c%40googlegroups.com.