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

80 lines
2.4 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.List;
/* loaded from: classes.dex */
public final class HJN extends TypeAdapter implements HJa {
private PYE b;
private InterfaceC15734iCu c;
private Gson d;
public HJN(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.d = gson;
this.c = 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;
}
Hfu hfu = (Hfu) obj;
Gson gson = this.d;
PYE pye = this.b;
jsonWriter.beginObject();
iXl ixl = hfu.c;
pye.c(jsonWriter, 401);
iXl ixl2 = hfu.c;
DTh.b(gson, iXl.class, ixl2).write(jsonWriter, ixl2);
if (hfu != hfu.a) {
pye.c(jsonWriter, 424);
KUy kUy = new KUy();
List<Pve> list = hfu.a;
DTh.a(gson, kUy, list).write(jsonWriter, list);
}
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;
}
Hfu hfu = new Hfu();
Gson gson = this.d;
InterfaceC15734iCu interfaceC15734iCu = this.c;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 56) {
if (e != 140) {
jsonReader.skipValue();
} else if (z) {
hfu.c = (iXl) gson.getAdapter(iXl.class).read2(jsonReader);
} else {
hfu.c = null;
jsonReader.nextNull();
}
} else if (z) {
hfu.a = (List) gson.getAdapter(new KUy()).read2(jsonReader);
} else {
hfu.a = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return hfu;
}
}