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

80 lines
2.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
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;
import org.jmrtd.PassportService;
/* loaded from: classes.dex */
public final class Cas extends TypeAdapter implements HJa {
private Gson b;
private InterfaceC15734iCu d;
private PYE e;
public Cas(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.b = gson;
this.d = 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;
}
LvK lvK = (LvK) obj;
Gson gson = this.b;
PYE pye = this.e;
jsonWriter.beginObject();
if (lvK != lvK.a) {
pye.c(jsonWriter, 494);
String str = lvK.a;
DTh.b(gson, String.class, str).write(jsonWriter, str);
}
if (lvK != lvK.d) {
pye.c(jsonWriter, PassportService.DEFAULT_MAX_BLOCKSIZE);
String str2 = lvK.d;
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;
}
LvK lvK = new LvK();
Gson gson = this.b;
InterfaceC15734iCu interfaceC15734iCu = this.d;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 55) {
if (e != 327) {
jsonReader.skipValue();
} else if (z) {
lvK.a = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
lvK.a = null;
jsonReader.nextNull();
}
} else if (z) {
lvK.d = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
lvK.d = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return lvK;
}
}