com.glookast.commons.timecode.json.TimecodeSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-timecode Show documentation
Show all versions of commons-timecode Show documentation
XML base schemas used for interfacing with Glookast Products
package com.glookast.commons.timecode.json;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import com.glookast.commons.timecode.AbstractTimecode;
import com.glookast.commons.timecode.Timecode;
import java.io.IOException;
public class TimecodeSerializer extends StdSerializer
{
protected TimecodeSerializer()
{
super(Timecode.class);
}
@Override
public void serialize(Timecode value, JsonGenerator gen, SerializerProvider provider) throws IOException
{
gen.writeString(value.toString(AbstractTimecode.StringType.STORAGE));
}
}