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

77 lines
2.4 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;
/* loaded from: classes.dex */
public final class NLx extends TypeAdapter implements HJa {
private InterfaceC15734iCu b;
private PYE c;
private Gson e;
public NLx(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.e = gson;
this.b = 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;
}
TqF tqF = (TqF) obj;
Gson gson = this.e;
PYE pye = this.c;
jsonWriter.beginObject();
String str = tqF.c;
pye.c(jsonWriter, 96);
String str2 = tqF.c;
DTh.b(gson, String.class, str2).write(jsonWriter, str2);
Integer num = tqF.e;
pye.c(jsonWriter, 397);
Integer num2 = tqF.e;
DTh.b(gson, Integer.class, num2).write(jsonWriter, num2);
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;
}
TqF tqF = new TqF();
Gson gson = this.e;
InterfaceC15734iCu interfaceC15734iCu = this.b;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 60) {
if (e != 93) {
jsonReader.skipValue();
} else if (z) {
tqF.c = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
tqF.c = null;
jsonReader.nextNull();
}
} else if (z) {
tqF.e = (Integer) gson.getAdapter(Integer.class).read2(jsonReader);
} else {
tqF.e = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return tqF;
}
}