Skip to content

Commit

Permalink
Add proper logical type for date/time
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 30, 2020
1 parent fa7e801 commit 9729aae
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.JacksonStdImpl;
import com.fasterxml.jackson.databind.deser.ContextualDeserializer;
import com.fasterxml.jackson.databind.type.LogicalType;
import com.fasterxml.jackson.databind.util.ClassUtil;
import com.fasterxml.jackson.databind.util.StdDateFormat;

Expand Down Expand Up @@ -101,6 +102,11 @@ protected DateBasedDeserializer(DateBasedDeserializer<T> base,

protected abstract DateBasedDeserializer<T> withDateFormat(DateFormat df, String formatStr);

@Override // since 2.12
public LogicalType logicalType() {
return LogicalType.DateTime;
}

@Override
public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
BeanProperty property)
Expand Down

0 comments on commit 9729aae

Please sign in to comment.