jackson custom deserializer not called
<p>I have the following endpoint in retrofit:</p>

<pre><code>@GET("user/detail")
Observable&lt;JacksonResponse&lt;User&gt;&gt; getUserDetail();
</code></pre>

<p>This endpoint returns the following result:</p>

<pre><code>{
  "code":1012,
  "status":"sucess",
  "message":"Datos Del Usuario",
  "time":"28-10-2015 10:42:04",
  "data":{
    "id_hash":977417640,
    "user_name":"Daniel",
    "user_surname":"Hdz Iglesias",
    "birthdate":"1990-02-07",
    "height":190,
    "weight":80,
    "sex":2,
    "photo_path":" https:\/\/graph.facebook.com
    \/422\/picture?width=100&amp;height=100"
  }
}
</code></pre>

<p>Here is the definition of the class:</p>

<pre><code>public class JacksonResponse&lt;T&gt; {

    private Integer code;
    private String status;
    private String message;
    private String time;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private T data;

    public JacksonResponse(){}

    @JsonCreator
    public JacksonResponse(
            @JsonProperty("code") Integer code,
            @JsonProperty("status") String status,
            @JsonProperty("message") String message,
            @JsonProperty("time") String time,
            @JsonProperty("data") T data) {
        this.code = code;
        this.status = status;
        this.message = message;
        this.time = time;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

}
</code></pre>

<p>I want the content "data" is mapped to the user class, whose extract show here:</p>

<pre><code>@JsonIgnoreProperties(ignoreUnknown = true)
@ModelContainer
@Table(database = AppDatabase.class)
public class User extends BaseModel {

    @PrimaryKey(autoincrement = true)
    private Long id;
    @Column
    private Long idFacebook;
    @Column
    @JsonProperty("user_name")
    private String name;
    @Column
    @JsonProperty("user_surname")
    private String surname;
    @Column
    private Date birthday;
    @Column
    @JsonProperty("height")
    private Double height;
    @Column
    @JsonProperty("weight")
    private Double weight;
    @Column
    private String tokenFacebook;
    @Column
    @JsonProperty("sex")
    private Integer sex;
    @Column
    private String email;
    @Column
    private String token;
    @Column
    private Date lastActivity;
    @Column
    @JsonProperty("id_hash")
    private Long idHash;
    @Column
    @JsonProperty("photo_path")
    private String photoPath;
</code></pre>

<p>To birthdate, I have defined a custom deserializer, whose code show here:</p>

<pre><code>public class BirthdayDeserializer extends JsonDeserializer&lt;Date&gt; {
    @Override
    public Date deserialize(JsonParser jsonparser, DeserializationContext deserializationcontext) throws IOException {

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String date = jsonparser.getText();
        try {
            return format.parse(date);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }

}
</code></pre>

<p>I am using this as follows (at User class):</p>

<pre><code>@JsonProperty("birthday")
@JsonDeserialize(using = BirthdayDeserializer.class)
public void setBirthday(Date birthday) {
  this.birthday = birthday;
}
</code></pre>

<p>but this is never called.</p>

<p>Any idea what 's going on?</p>