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

56 lines
1.6 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 EU extends TypeAdapter implements HJa {
private PYE a;
private Gson b;
private InterfaceC15734iCu d;
public EU(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.b = 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;
}
Gson gson = this.b;
PYE pye = this.a;
jsonWriter.beginObject();
pye.c(jsonWriter, 601);
Class cls = Boolean.TYPE;
Boolean valueOf = Boolean.valueOf(((EQ) obj).e);
DTh.b(gson, cls, valueOf).write(jsonWriter, valueOf);
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;
}
EQ eq = new EQ();
Gson gson = this.b;
InterfaceC15734iCu interfaceC15734iCu = this.d;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
eq.a(gson, jsonReader, interfaceC15734iCu.e(jsonReader));
}
jsonReader.endObject();
return eq;
}
}