package com.flurry.org.codehaus.jackson.map.deser;

import com.flurry.org.codehaus.jackson.Base64Variants;
import com.flurry.org.codehaus.jackson.JsonParser;
import com.flurry.org.codehaus.jackson.JsonProcessingException;
import com.flurry.org.codehaus.jackson.JsonToken;
import com.flurry.org.codehaus.jackson.map.DeserializationContext;
import com.flurry.org.codehaus.jackson.map.TypeDeserializer;
import com.flurry.org.codehaus.jackson.map.annotate.JacksonStdImpl;
import com.flurry.org.codehaus.jackson.type.JavaType;
import java.io.IOException;

@Deprecated
/* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/1.dex */
public abstract class StdDeserializer<T> extends com.flurry.org.codehaus.jackson.map.deser.std.StdDeserializer<T> {
    protected StdDeserializer(Class<?> vc) {
        super(vc);
    }

    protected StdDeserializer(JavaType valueType) {
        super(valueType);
    }

    @JacksonStdImpl
    @Deprecated
    /* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/1.dex */
    public class ClassDeserializer extends com.flurry.org.codehaus.jackson.map.deser.std.ClassDeserializer {
        public ClassDeserializer() {
        }
    }

    @JacksonStdImpl
    @Deprecated
    /* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/1.dex */
    public class CalendarDeserializer extends com.flurry.org.codehaus.jackson.map.deser.std.CalendarDeserializer {
        public CalendarDeserializer() {
        }
    }

    @JacksonStdImpl
    @Deprecated
    /* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/1.dex */
    public static final class StringDeserializer extends com.flurry.org.codehaus.jackson.map.deser.std.StdScalarDeserializer<String> {
        public StringDeserializer() {
            super(String.class);
        }

        @Override // com.flurry.org.codehaus.jackson.map.JsonDeserializer
        public String deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
            JsonToken curr = jp.getCurrentToken();
            if (curr == JsonToken.VALUE_STRING) {
                return jp.getText();
            }
            if (curr == JsonToken.VALUE_EMBEDDED_OBJECT) {
                Object ob = jp.getEmbeddedObject();
                if (ob == null) {
                    return null;
                }
                if (ob instanceof byte[]) {
                    return Base64Variants.getDefaultVariant().encode((byte[]) ob, false);
                }
                return ob.toString();
            } else if (curr.isScalarValue()) {
                return jp.getText();
            } else {
                throw ctxt.mappingException(this._valueClass, curr);
            }
        }

        @Override // com.flurry.org.codehaus.jackson.map.deser.std.StdScalarDeserializer, com.flurry.org.codehaus.jackson.map.deser.std.StdDeserializer, com.flurry.org.codehaus.jackson.map.JsonDeserializer
        public String deserializeWithType(JsonParser jp, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JsonProcessingException {
            return deserialize(jp, ctxt);
        }
    }
}
