commit
e3b9215a5a
|
@ -2,12 +2,15 @@ package org.baeldung.jackson.exception;
|
|||
|
||||
public class Zoo {
|
||||
public Animal animal;
|
||||
|
||||
public Zoo() {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Animal {
|
||||
public String name;
|
||||
|
||||
protected Animal() {
|
||||
public Animal() {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,13 +4,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|||
|
||||
public class ZooConfigured {
|
||||
public AnimalConfigured animal;
|
||||
|
||||
public ZooConfigured() {
|
||||
}
|
||||
}
|
||||
|
||||
@JsonDeserialize(as = CatConfigured.class)
|
||||
abstract class AnimalConfigured {
|
||||
public String name;
|
||||
|
||||
protected AnimalConfigured() {
|
||||
public AnimalConfigured() {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue