Code example for TimeZone

Methods: getID

0
 
    @Override 
    public void serialize(TimeZone value, JsonGenerator jgen, SerializerProvider provider)
        throws IOException, JsonGenerationException 
    { 
        jgen.writeString(value.getID());
    } 
 
    @Override 
    public void serializeWithType(TimeZone value, JsonGenerator jgen, SerializerProvider provider,
            TypeSerializer typeSer)
        throws IOException, JsonGenerationException 
    { 
        // Better ensure we don't use specific sub-classes: 
        typeSer.writeTypePrefixForScalar(value, jgen, TimeZone.class);
        serialize(value, jgen, provider);
        typeSer.writeTypeSuffixForScalar(value, jgen);
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java