mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 01:22:33 -06:00
81 lines
2.8 KiB
Java
81 lines
2.8 KiB
Java
package io.sentry.protocol;
|
|
|
|
import io.sentry.ILogger;
|
|
import io.sentry.JsonDeserializer;
|
|
import io.sentry.JsonObjectReader;
|
|
import io.sentry.JsonSerializable;
|
|
import io.sentry.JsonUnknown;
|
|
import io.sentry.ObjectWriter;
|
|
import io.sentry.vendor.gson.stream.JsonToken;
|
|
import java.io.IOException;
|
|
import java.util.Map;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class TransactionInfo implements JsonSerializable, JsonUnknown {
|
|
private final String source;
|
|
private Map<String, Object> unknown;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static final class JsonKeys {
|
|
public static final String SOURCE = "source";
|
|
}
|
|
|
|
@Override // io.sentry.JsonUnknown
|
|
public Map<String, Object> getUnknown() {
|
|
return this.unknown;
|
|
}
|
|
|
|
@Override // io.sentry.JsonUnknown
|
|
public void setUnknown(Map<String, Object> map) {
|
|
this.unknown = map;
|
|
}
|
|
|
|
public TransactionInfo(String str) {
|
|
this.source = str;
|
|
}
|
|
|
|
@Override // io.sentry.JsonSerializable
|
|
public void serialize(ObjectWriter objectWriter, ILogger iLogger) throws IOException {
|
|
objectWriter.beginObject();
|
|
if (this.source != null) {
|
|
objectWriter.name(JsonKeys.SOURCE).value(iLogger, this.source);
|
|
}
|
|
Map<String, Object> map = this.unknown;
|
|
if (map != null) {
|
|
for (String str : map.keySet()) {
|
|
Object obj = this.unknown.get(str);
|
|
objectWriter.name(str);
|
|
objectWriter.value(iLogger, obj);
|
|
}
|
|
}
|
|
objectWriter.endObject();
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static final class Deserializer implements JsonDeserializer<TransactionInfo> {
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // io.sentry.JsonDeserializer
|
|
public TransactionInfo deserialize(JsonObjectReader jsonObjectReader, ILogger iLogger) throws Exception {
|
|
jsonObjectReader.beginObject();
|
|
String str = null;
|
|
ConcurrentHashMap concurrentHashMap = null;
|
|
while (jsonObjectReader.peek() == JsonToken.NAME) {
|
|
String nextName = jsonObjectReader.nextName();
|
|
nextName.hashCode();
|
|
if (nextName.equals(JsonKeys.SOURCE)) {
|
|
str = jsonObjectReader.nextStringOrNull();
|
|
} else {
|
|
if (concurrentHashMap == null) {
|
|
concurrentHashMap = new ConcurrentHashMap();
|
|
}
|
|
jsonObjectReader.nextUnknown(iLogger, concurrentHashMap, nextName);
|
|
}
|
|
}
|
|
TransactionInfo transactionInfo = new TransactionInfo(str);
|
|
transactionInfo.setUnknown(concurrentHashMap);
|
|
jsonObjectReader.endObject();
|
|
return transactionInfo;
|
|
}
|
|
}
|
|
}
|