All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.optionfactory.spring.time.jackson.adapters.LocalTimeFromIsoString Maven / Gradle / Ivy

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.LocalTime;
import java.time.format.DateTimeFormatter;

public class LocalTimeFromIsoString extends JsonDeserializer {

    @Override
    public LocalTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
        return LocalTime.parse(p.getText(), DateTimeFormatter.ISO_LOCAL_TIME);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy