Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.datatype.joda.ser;
 
 
 
public final class InstantSerializer
    extends JodaSerializerBase<Instant>
    public InstantSerializer() { super(Instant.class); }
    @Override
    public void serialize(Instant 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