com.applitools.utils.Iso8610CalendarSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-common-java Show documentation
Show all versions of eyes-common-java Show documentation
Common code for Applitools Eyes Java SDK projects
package com.applitools.utils;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.util.Calendar;
/**
* Serializes {@link Calendar} instances as an ISO8610 formatted string.
*/
public class Iso8610CalendarSerializer extends JsonSerializer {
@Override
public void serialize(Calendar value,
@SuppressWarnings("SpellCheckingInspection") JsonGenerator jgen,
SerializerProvider provider) throws IOException {
jgen.writeString(GeneralUtils.toISO8601DateTime(value));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy