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

68 lines
2.1 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;
/* renamed from: o.yZS, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C17637yZS extends TypeAdapter implements HJa {
private InterfaceC15734iCu b;
private Gson d;
private PYE e;
public C17637yZS(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.d = gson;
this.b = interfaceC15734iCu;
this.e = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
C17378wJk c17378wJk = (C17378wJk) obj;
Gson gson = this.d;
PYE pye = this.e;
jsonWriter.beginObject();
if (c17378wJk != c17378wJk.e) {
pye.c(jsonWriter, 576);
String str = c17378wJk.e;
DTh.b(gson, String.class, str).write(jsonWriter, str);
}
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;
}
C17378wJk c17378wJk = new C17378wJk();
Gson gson = this.d;
InterfaceC15734iCu interfaceC15734iCu = this.b;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 506) {
jsonReader.skipValue();
} else if (z) {
c17378wJk.e = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
c17378wJk.e = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return c17378wJk;
}
}