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

com.buyexpressly.api.util.DateTimeIso8601DateSerializer Maven / Gradle / Ivy

Go to download

Expressly Java SDK to integrate e-commerce platforms with the Expressly Network API

There is a newer version: 2.3.1
Show newest version
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));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy