Skip to content

Commit a8be5f0

Browse files
committed
Refactor Json::isJson() to use json_validate function
Now that we've dropped support for PHP 8.2, we can use PHP's json_validate function.
1 parent 76da338 commit a8be5f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Support/Json.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ public static function isJson($value): bool
1515
return false;
1616
}
1717

18-
// TODO: Replace this with json_validate when dropping support for PHP 8.2.
19-
return is_array(json_decode($value, true));
18+
return json_validate($value);
2019
}
2120
}

0 commit comments

Comments
 (0)