com.geotab.model.serialization.LocalDateDeserializer Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.serialization;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
import java.time.LocalDate;
public class LocalDateDeserializer extends JsonDeserializer {
@Override
public LocalDate deserialize(JsonParser jsonParser, DeserializationContext context)
throws IOException {
return DateTimeSerializationUtil.localDateFromString(jsonParser.getText());
}
}