nl.vpro.jackson2.StringZonedLocalDateToJsonTimestamp Maven / Gradle / Ivy
The newest version!
package nl.vpro.jackson2;
import java.io.IOException;
import java.time.Instant;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
import nl.vpro.util.BindingUtils;
import nl.vpro.util.TimeUtils;
import static nl.vpro.jackson2.DateModule.ZONE;
/**
* @since 2.5
*/
public class StringZonedLocalDateToJsonTimestamp {
private StringZonedLocalDateToJsonTimestamp() {}
private static final DateTimeFormatter FORMATTER = DateTimeFormatter
.ofPattern("yyyy-MM-ddZZZZZ")
.withLocale(Locale.US);
public static class Serializer extends JsonSerializer