diff --git a/src/Illuminate/Support/Str.php b/src/Illuminate/Support/Str.php index da9540e29ede..ae0849434b14 100644 --- a/src/Illuminate/Support/Str.php +++ b/src/Illuminate/Support/Str.php @@ -452,6 +452,10 @@ public static function isJson($value) return false; } + if (function_exists('json_validate')) { + return json_validate($value, 512); + } + try { json_decode($value, true, 512, JSON_THROW_ON_ERROR); } catch (JsonException) {