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

80 lines
2.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
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;
import java.util.Map;
/* loaded from: classes.dex */
public final class Qnk extends TypeAdapter implements HJa {
private InterfaceC15734iCu a;
private PYE b;
private Gson e;
public Qnk(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.e = gson;
this.a = interfaceC15734iCu;
this.b = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
Pve pve = (Pve) obj;
Gson gson = this.e;
PYE pye = this.b;
jsonWriter.beginObject();
String str = pve.c;
pye.c(jsonWriter, 309);
String str2 = pve.c;
DTh.b(gson, String.class, str2).write(jsonWriter, str2);
if (pve != pve.a) {
pye.c(jsonWriter, 386);
qMo qmo = new qMo();
Map<String, String> map = pve.a;
DTh.a(gson, qmo, map).write(jsonWriter, map);
}
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;
}
Pve pve = new Pve();
Gson gson = this.e;
InterfaceC15734iCu interfaceC15734iCu = this.a;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 202) {
if (e != 472) {
jsonReader.skipValue();
} else if (z) {
pve.c = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
pve.c = null;
jsonReader.nextNull();
}
} else if (z) {
pve.a = (Map) gson.getAdapter(new qMo()).read2(jsonReader);
} else {
pve.a = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return pve;
}
}