De-serializing JSON to polymorphic object model using Spring and JsonTypeInfo annotation

后端 未结 6 1363
[愿得一人]
[愿得一人] 2020-12-29 20:17

I have the following object model in my Spring MVC (v3.2.0.RELEASE) web application:

public class Order {
  private Payment payment;
}

@JsonTypeInfo(use = J         


        
6条回答
  •  盖世英雄少女心
    2020-12-29 20:48

    In my case I had added defaultImpl = SomeClass.class to @JsonTypeInfo and was trying to convert it SomeClass2.class

提交回复
热议问题