package l5;

/* JADX INFO: loaded from: classes3.dex */
public final class D implements g5.a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final D f20327a = new D();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final i5.h f20328b = W.a.T("kotlinx.serialization.json.JsonPrimitive", i5.e.f19086r, new i5.g[0]);

    @Override // g5.a
    public final Object deserialize(j5.c decoder) {
        kotlin.jvm.internal.o.h(decoder, "decoder");
        m mVarL = W.d.j(decoder).l();
        if (mVarL instanceof C) {
            return (C) mVarL;
        }
        throw m5.l.c(-1, mVarL.toString(), "Unexpected JSON element, expected JsonPrimitive, had " + kotlin.jvm.internal.D.a(mVarL.getClass()));
    }

    @Override // g5.a
    public final i5.g getDescriptor() {
        return f20328b;
    }

    @Override // g5.a
    public final void serialize(j5.d encoder, Object obj) {
        C value = (C) obj;
        kotlin.jvm.internal.o.h(encoder, "encoder");
        kotlin.jvm.internal.o.h(value, "value");
        W.d.i(encoder);
        if (value instanceof v) {
            encoder.s(w.f20364a, v.INSTANCE);
        } else {
            encoder.s(t.f20362a, (s) value);
        }
    }
}
