79 lines
2.4 KiB
Java
79 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 QjC extends TypeAdapter implements HJa {
|
|
private Gson b;
|
|
private InterfaceC15734iCu d;
|
|
private PYE e;
|
|
|
|
public QjC(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;
|
|
}
|
|
xHz xhz = (xHz) obj;
|
|
Gson gson = this.b;
|
|
PYE pye = this.e;
|
|
jsonWriter.beginObject();
|
|
if (xhz != xhz.e) {
|
|
pye.c(jsonWriter, 452);
|
|
String str = xhz.e;
|
|
DTh.b(gson, String.class, str).write(jsonWriter, str);
|
|
}
|
|
if (xhz != xhz.b) {
|
|
pye.c(jsonWriter, 218);
|
|
String str2 = xhz.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;
|
|
}
|
|
xHz xhz = new xHz();
|
|
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 != 387) {
|
|
if (e != 542) {
|
|
jsonReader.skipValue();
|
|
} else if (z) {
|
|
xhz.e = (String) gson.getAdapter(String.class).read2(jsonReader);
|
|
} else {
|
|
xhz.e = null;
|
|
jsonReader.nextNull();
|
|
}
|
|
} else if (z) {
|
|
xhz.b = (String) gson.getAdapter(String.class).read2(jsonReader);
|
|
} else {
|
|
xhz.b = null;
|
|
jsonReader.nextNull();
|
|
}
|
|
}
|
|
jsonReader.endObject();
|
|
return xhz;
|
|
}
|
|
}
|