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

66 lines
2.0 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 Frf extends TypeAdapter implements HJa {
private PYE c;
private InterfaceC15734iCu d;
private Gson e;
public Frf(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.e = gson;
this.d = 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;
}
RKq rKq = (RKq) obj;
Gson gson = this.e;
PYE pye = this.c;
jsonWriter.beginObject();
String str = rKq.b;
pye.c(jsonWriter, 2);
String str2 = rKq.b;
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;
}
RKq rKq = new RKq();
Gson gson = this.e;
InterfaceC15734iCu interfaceC15734iCu = this.d;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 509) {
jsonReader.skipValue();
} else if (z) {
rKq.b = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
rKq.b = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return rKq;
}
}