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(){}
}