the following JSON
{"zdt":["2017-03-22T14:50:08.121+01:00"]}
Cannot be deserialized into the following class:
public static class TestJava8TimeBean{
private ZonedDateTime zdt=ZonedDateTime.now();
public TestJava8TimeBean(){
}
public ZonedDateTime getZdt() {
return zdt;
}
public void setZdt(ZonedDateTime zdt) {
this.zdt = zdt;
}
But the mapper I use defines:
mapper.configure(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS, true);
So using an array with one value should work. It does with strings. Also probably if DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT is enabled, an empty array should result in a null value.