We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 073a98a commit 070b74dCopy full SHA for 070b74d
src/JWT.php
@@ -333,7 +333,12 @@ public static function jsonDecode($input)
333
*/
334
public static function jsonEncode($input)
335
{
336
- $json = \json_encode($input);
+ if (PHP_VERSION_ID >= 50400) {
337
+ $json = \json_encode($input, \JSON_UNESCAPED_SLASHES);
338
+ } else {
339
+ // PHP 5.3 only
340
+ $json = \json_encode($input);
341
+ }
342
if ($errno = \json_last_error()) {
343
static::handleJsonError($errno);
344
} elseif ($json === 'null' && $input !== null) {
0 commit comments