Merge pull request #104 from Doha2012/master

Modify jackson exception
This commit is contained in:
Eugen 2014-12-20 15:30:12 +02:00
commit e3b9215a5a
2 changed files with 8 additions and 2 deletions

View File

@ -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() {
}
}

View File

@ -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() {
}
}