Dynamic polymorphic type handling with Jackson

后端 未结 4 1072
暗喜
暗喜 2020-12-31 07:40

I have a class hierarchy similar to this one:

public static class BaseConfiguration {
}

public abstract class Base {
  private BaseConfiguration configurati         


        
4条回答
  •  粉色の甜心
    2020-12-31 08:13

    Apparently the answer was to implement something similar to the sixth solution posted at http://programmerbruce.blogspot.com/2011/05/deserialize-json-with-jackson-into.html, which uses unique JSON element names to identify the target type to deserialize to.

提交回复
热议问题