com.buyexpressly.api.util.DateTimeIso8601DateSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-sdk Show documentation
Show all versions of plugin-sdk Show documentation
Expressly Java SDK to integrate e-commerce platforms with the Expressly Network API
package com.buyexpressly.api.util;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
import org.joda.time.DateTime;
import org.joda.time.format.ISODateTimeFormat;
import java.io.IOException;
public class DateTimeIso8601DateSerializer extends JsonSerializer {
@Override
public void serialize(DateTime value, JsonGenerator generator, SerializerProvider serializer) throws IOException {
generator.writeString(ISODateTimeFormat.dateTimeNoMillis().print(value));
}
}