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

后端 未结 6 1364
[愿得一人]
[愿得一人] 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 21:09

    Try to register subtype using ObjectMapper.registerSubtypes instead of using annotations

提交回复
热议问题