I\'m trying to marshal response containing ISO formatted timestamp like that:
{
...
\"time\" : \"2014-07-02T04:00:00.000000Z\"
...
}
into <
Jackson configuration looks fine, I tried the following and was able to deserialize the value:
public class Test {
public static void main(String[] args) throws Exception {
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JavaTimeModule());
Model model = mapper.readValue("{\"time\" : \"2014-07-02T04:00:00.000000Z\"}", Model.class);
System.out.println(model.getTime());
}
}
class Model{
private ZonedDateTime time;
public ZonedDateTime getTime() {
return time;
}
public void setTime(ZonedDateTime time) {
this.time = time;
}
}
I can reproduce it by commenting out mapper.registerModule(new JavaTimeModule());
. So, it looks like jersey client is not using custom mapper
instance. Could you try configuring it as described here.