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

68 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 Pfs extends TypeAdapter implements HJa {
private InterfaceC15734iCu a;
private Gson b;
private PYE d;
public Pfs(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.b = gson;
this.a = 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;
}
JNE jne = (JNE) obj;
Gson gson = this.b;
PYE pye = this.d;
jsonWriter.beginObject();
if (jne != jne.a) {
pye.c(jsonWriter, 12);
String str = jne.a;
DTh.b(gson, String.class, str).write(jsonWriter, str);
}
jne.d(gson, jsonWriter, pye);
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;
}
JNE jne = new JNE();
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 != 117) {
jne.c(gson, jsonReader, e);
} else if (z) {
jne.a = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
jne.a = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return jne;
}
}