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

81 lines
2.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;
import java.util.List;
/* renamed from: o.dnX, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C9635dnX extends TypeAdapter implements HJa {
private InterfaceC15734iCu a;
private Gson b;
private PYE c;
public C9635dnX(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.b = gson;
this.a = interfaceC15734iCu;
this.c = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
C9691dof c9691dof = (C9691dof) obj;
Gson gson = this.b;
PYE pye = this.c;
jsonWriter.beginObject();
if (c9691dof != c9691dof.b) {
pye.c(jsonWriter, 124);
C9690doe c9690doe = new C9690doe();
List<String> list = c9691dof.b;
DTh.a(gson, c9690doe, list).write(jsonWriter, list);
}
String str = c9691dof.d;
pye.c(jsonWriter, 551);
String str2 = c9691dof.d;
DTh.b(gson, String.class, str2).write(jsonWriter, str2);
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;
}
C9691dof c9691dof = new C9691dof();
Gson gson = this.b;
InterfaceC15734iCu interfaceC15734iCu = this.a;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 121) {
if (e != 191) {
jsonReader.skipValue();
} else if (z) {
c9691dof.b = (List) gson.getAdapter(new C9690doe()).read2(jsonReader);
} else {
c9691dof.b = null;
jsonReader.nextNull();
}
} else if (z) {
c9691dof.d = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
c9691dof.d = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return c9691dof;
}
}