I have class
public class Car() {
@JsonProperty("type")
private String type;
@JsonProperty("configuration")
@JsonDeserialize(using = AlertRuleConfigurationDeserialize.class)
private Configuration config;
}
Configuration is interface which have 3 classes. How can I deserialize Car from json via type? If I have String type = "type1", I should deserialize to ConfigurationImplFirst, etc. I read this answer, but property = "type" inside Configuration, but I have outside. And because of it, I can't use @JsonDeserialize above property, because I have no information about type