net.optionfactory.spring.time.jackson.adapters.YearMonthFromIsoString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of time-jackson Show documentation
Show all versions of time-jackson Show documentation
optionfactory-spring jackson time serializers/deserializers
package net.optionfactory.spring.time.jackson.adapters;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
import java.time.YearMonth;
public class YearMonthFromIsoString extends JsonDeserializer {
@Override
public YearMonth deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
return YearMonth.parse(p.getText());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy