Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.databind.ser.std;
 
 
 
public class TimeZoneSerializer
    public final static TimeZoneSerializer instance = new TimeZoneSerializer();
    
    public TimeZoneSerializer() { super(TimeZone.class); }
    @Override
    public void serialize(TimeZone valueJsonGenerator jgenSerializerProvider provider)
        throws IOExceptionJsonGenerationException
    {
        jgen.writeString(value.getID());
    }
    @Override
    public void serializeWithType(TimeZone valueJsonGenerator jgenSerializerProvider provider,
            TypeSerializer typeSer)
        throws IOExceptionJsonGenerationException
    {
        // Better ensure we don't use specific sub-classes:
        typeSer.writeTypePrefixForScalar(valuejgenTimeZone.class);
        serialize(valuejgenprovider);
        typeSer.writeTypeSuffixForScalar(valuejgen);
    }
New to GrepCode? Check out our FAQ X