67 lines
2.0 KiB
Java
67 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 XN extends TypeAdapter implements HJa {
|
|
private PYE b;
|
|
private Gson c;
|
|
private InterfaceC15734iCu d;
|
|
|
|
public XN(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
|
|
this.c = gson;
|
|
this.d = interfaceC15734iCu;
|
|
this.b = pye;
|
|
}
|
|
|
|
@Override // com.google.gson.TypeAdapter
|
|
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
|
|
if (obj == null) {
|
|
jsonWriter.nullValue();
|
|
return;
|
|
}
|
|
XW xw = (XW) obj;
|
|
Gson gson = this.c;
|
|
PYE pye = this.b;
|
|
jsonWriter.beginObject();
|
|
if (xw != xw.e) {
|
|
pye.c(jsonWriter, 540);
|
|
String str = xw.e;
|
|
DTh.b(gson, String.class, str).write(jsonWriter, str);
|
|
}
|
|
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;
|
|
}
|
|
XW xw = new XW();
|
|
Gson gson = this.c;
|
|
InterfaceC15734iCu interfaceC15734iCu = this.d;
|
|
jsonReader.beginObject();
|
|
while (jsonReader.hasNext()) {
|
|
int e = interfaceC15734iCu.e(jsonReader);
|
|
boolean z = jsonReader.peek() != JsonToken.NULL;
|
|
if (e != 272) {
|
|
jsonReader.skipValue();
|
|
} else if (z) {
|
|
xw.e = (String) gson.getAdapter(String.class).read2(jsonReader);
|
|
} else {
|
|
xw.e = null;
|
|
jsonReader.nextNull();
|
|
}
|
|
}
|
|
jsonReader.endObject();
|
|
return xw;
|
|
}
|
|
}
|