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

74 lines
2.2 KiB
Java
Raw 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.HashMap;
import java.util.List;
/* loaded from: classes.dex */
public final class PT extends TypeAdapter implements HJa {
private PYE b;
private InterfaceC15734iCu d;
private Gson e;
public PT(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.e = gson;
this.d = 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;
}
PW pw = (PW) obj;
Gson gson = this.e;
PYE pye = this.b;
jsonWriter.beginObject();
if (pw != pw.b) {
pye.c(jsonWriter, 285);
PX px = new PX();
HashMap<String, List<PY>> hashMap = pw.b;
DTh.a(gson, px, hashMap).write(jsonWriter, hashMap);
}
pye.c(jsonWriter, 601);
Class cls = Boolean.TYPE;
Boolean valueOf = Boolean.valueOf(pw.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;
}
PW pw = new PW();
Gson gson = this.e;
InterfaceC15734iCu interfaceC15734iCu = this.d;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 24) {
pw.a(gson, jsonReader, e);
} else if (z) {
pw.b = (HashMap) gson.getAdapter(new PX()).read2(jsonReader);
} else {
pw.b = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return pw;
}
}