Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.datatype.joda.ser;
 
 
 
public final class DateTimeSerializer
    extends JodaSerializerBase<DateTime>
    public DateTimeSerializer() { super(DateTime.class); }
    @Override
    public void serialize(DateTime valueJsonGenerator jgenSerializerProvider provider)
        throws IOExceptionJsonGenerationException
    {
            jgen.writeNumber(value.getMillis());
        } else {
            jgen.writeString(value.toString());
        }
    }
    @Override
    public JsonNode getSchema(SerializerProvider providerjava.lang.reflect.Type typeHint)
    {
                ? "number" : "string"true);
    }
New to GrepCode? Check out our FAQ X