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

67 lines
2.0 KiB
Java

package o;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
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;
/* loaded from: classes.dex */
public final class II extends TypeAdapter implements HJa {
private Gson b;
private InterfaceC15734iCu c;
private PYE d;
public II(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.b = gson;
this.c = interfaceC15734iCu;
this.d = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
IH ih = (IH) obj;
Gson gson = this.b;
PYE pye = this.d;
jsonWriter.beginObject();
JsonArray jsonArray = ih.e;
pye.c(jsonWriter, 686);
JsonArray jsonArray2 = ih.e;
DTh.b(gson, JsonArray.class, jsonArray2).write(jsonWriter, jsonArray2);
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;
}
IH ih = new IH();
Gson gson = this.b;
InterfaceC15734iCu interfaceC15734iCu = this.c;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 401) {
jsonReader.skipValue();
} else if (z) {
ih.e = (JsonArray) gson.getAdapter(JsonArray.class).read2(jsonReader);
} else {
ih.e = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return ih;
}
}