com.podio.serialize.LocalDateDeserializer Maven / Gradle / Ivy
package com.podio.serialize;
import java.io.IOException;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;
import org.joda.time.LocalDate;
public class LocalDateDeserializer extends JsonDeserializer {
@Override
public LocalDate deserialize(JsonParser jp, DeserializationContext ctxt)
throws IOException, JsonProcessingException {
return DateTimeUtil.parseDate(jp.getText());
}
}