Sha256: 0c2a7243e10bcf746a1f7e8f9ab776bd75b9b5a6a76c9e4cff949ff7eb9333f4

Contents?: true

Size: 1.21 KB

Versions: 164

Compression:

Stored size: 1.21 KB

Contents

package sh.calaba.org.codehaus.jackson.map.ser.std;

import java.io.IOException;
import java.util.TimeZone;

import sh.calaba.org.codehaus.jackson.JsonGenerationException;
import sh.calaba.org.codehaus.jackson.JsonGenerator;
import sh.calaba.org.codehaus.jackson.map.SerializerProvider;
import sh.calaba.org.codehaus.jackson.map.TypeSerializer;

/**
 * @since 1.8
 */
public class TimeZoneSerializer
    extends ScalarSerializerBase<TimeZone>
{
    public final static TimeZoneSerializer instance = new TimeZoneSerializer();
    
    public TimeZoneSerializer() { super(TimeZone.class); }

    @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);
    }
}

Version data entries

164 entries across 164 versions & 2 rubygems

Version Path
calabash-android-0.4.3.pre2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.3.pre1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
testautoa-0.4.1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.2 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.1 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre18 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
testautoa-0.4.0.pre19 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
testautoa-0.4.0.pre18 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
testautoa-0.4.0.pre16 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre17 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre16 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre15 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre11 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre10 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre9 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre8 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre7 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre6 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java
calabash-android-0.4.0.pre5 test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/map/ser/std/TimeZoneSerializer.java