mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-18 11:57:18 +01:00
50 lines
2.3 KiB
Java
50 lines
2.3 KiB
Java
package androidx.credentials.internal;
|
|
|
|
import androidx.annotation.RestrictTo;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.JvmStatic;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.json.JSONObject;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0000\u0018\u0000 \u00032\u00020\u0001:\u0001\u0003B\u0005¢\u0006\u0002\u0010\u0002¨\u0006\u0004"}, d2 = {"Landroidx/credentials/internal/RequestValidationHelper;", "", "()V", "Companion", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes13.dex */
|
|
public final class RequestValidationHelper {
|
|
|
|
/* renamed from: Companion, reason: from kotlin metadata */
|
|
@NotNull
|
|
public static final Companion INSTANCE = new Companion(null);
|
|
|
|
@JvmStatic
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public static final boolean isValidJSON(@NotNull String str) {
|
|
return INSTANCE.isValidJSON(str);
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007¨\u0006\u0007"}, d2 = {"Landroidx/credentials/internal/RequestValidationHelper$Companion;", "", "()V", "isValidJSON", "", "jsonString", "", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
@JvmStatic
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public final boolean isValidJSON(@NotNull String jsonString) {
|
|
jsonString.getClass();
|
|
if (jsonString.length() == 0) {
|
|
return false;
|
|
}
|
|
try {
|
|
new JSONObject(jsonString);
|
|
return true;
|
|
} catch (Exception unused) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
}
|