69 lines
2.0 KiB
Java
69 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;
|
||
|
import java.util.List;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class XDZ extends TypeAdapter implements HJa {
|
||
|
private InterfaceC15734iCu b;
|
||
|
private Gson c;
|
||
|
private PYE d;
|
||
|
|
||
|
public XDZ(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
|
||
|
this.c = gson;
|
||
|
this.b = 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;
|
||
|
}
|
||
|
ZRJ zrj = (ZRJ) obj;
|
||
|
Gson gson = this.c;
|
||
|
PYE pye = this.d;
|
||
|
jsonWriter.beginObject();
|
||
|
if (zrj != zrj.d) {
|
||
|
pye.c(jsonWriter, 340);
|
||
|
Wyr wyr = new Wyr();
|
||
|
List<cHC> list = zrj.d;
|
||
|
DTh.a(gson, wyr, list).write(jsonWriter, list);
|
||
|
}
|
||
|
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;
|
||
|
}
|
||
|
ZRJ zrj = new ZRJ();
|
||
|
Gson gson = this.c;
|
||
|
InterfaceC15734iCu interfaceC15734iCu = this.b;
|
||
|
jsonReader.beginObject();
|
||
|
while (jsonReader.hasNext()) {
|
||
|
int e = interfaceC15734iCu.e(jsonReader);
|
||
|
boolean z = jsonReader.peek() != JsonToken.NULL;
|
||
|
if (e != 257) {
|
||
|
jsonReader.skipValue();
|
||
|
} else if (z) {
|
||
|
zrj.d = (List) gson.getAdapter(new Wyr()).read2(jsonReader);
|
||
|
} else {
|
||
|
zrj.d = null;
|
||
|
jsonReader.nextNull();
|
||
|
}
|
||
|
}
|
||
|
jsonReader.endObject();
|
||
|
return zrj;
|
||
|
}
|
||
|
}
|