org.cloudfoundry.multiapps.controller.api.model.ZonedDateTimeDeserializer Maven / Gradle / Ivy
package org.cloudfoundry.multiapps.controller.api.model;
import java.io.IOException;
import java.time.ZonedDateTime;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
public class ZonedDateTimeDeserializer extends StdDeserializer {
private static final long serialVersionUID = 1L;
public ZonedDateTimeDeserializer() {
super(ZonedDateTime.class);
}
@Override
public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException {
String zonedDateTime = parser.getCodec()
.readValue(parser, String.class);
return ZonedDateTime.parse(zonedDateTime, Operation.DATE_TIME_FORMATTER);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy