Files
rr3-apk/decompiled/sources/androidx/credentials/internal/RequestValidationHelper.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

40 lines
1.1 KiB
Java

package androidx.credentials.internal;
import androidx.annotation.RestrictTo;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONObject;
/* loaded from: classes.dex */
public final class RequestValidationHelper {
public static final Companion Companion = new Companion(null);
@RestrictTo({RestrictTo.Scope.LIBRARY})
public static final boolean isValidJSON(String str) {
return Companion.isValidJSON(str);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
public final boolean isValidJSON(String jsonString) {
Intrinsics.checkNotNullParameter(jsonString, "jsonString");
if (jsonString.length() == 0) {
return false;
}
try {
new JSONObject(jsonString);
return true;
} catch (Exception unused) {
return false;
}
}
}
}