what-the-bank/sources/o/GY.java

66 lines
2.0 KiB
Java

package o;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
/* loaded from: classes.dex */
public final class GY extends TypeAdapter implements HJa {
private PYE a;
private Gson c;
private InterfaceC15734iCu d;
public GY(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.c = gson;
this.d = interfaceC15734iCu;
this.a = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
C0460Ha c0460Ha = (C0460Ha) obj;
Gson gson = this.c;
PYE pye = this.a;
jsonWriter.beginObject();
GX gx = c0460Ha.d;
pye.c(jsonWriter, 553);
GX gx2 = c0460Ha.d;
DTh.b(gson, GX.class, gx2).write(jsonWriter, gx2);
jsonWriter.endObject();
}
@Override // com.google.gson.TypeAdapter
/* renamed from: read */
public final Object read2(JsonReader jsonReader) throws IOException {
if (jsonReader.peek() == JsonToken.NULL) {
jsonReader.skipValue();
return null;
}
C0460Ha c0460Ha = new C0460Ha();
Gson gson = this.c;
InterfaceC15734iCu interfaceC15734iCu = this.d;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 532) {
jsonReader.skipValue();
} else if (z) {
c0460Ha.d = (GX) gson.getAdapter(GX.class).read2(jsonReader);
} else {
c0460Ha.d = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return c0460Ha;
}
}