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 86d8310 commit b17f5a7Copy full SHA for b17f5a7
src/JWT.php
@@ -330,7 +330,12 @@ public static function jsonDecode($input)
330
*/
331
public static function jsonEncode($input)
332
{
333
- $json = \json_encode($input);
+ if (PHP_VERSION_ID >= 50400) {
334
+ $json = \json_encode($input, \JSON_UNESCAPED_SLASHES);
335
+ } else {
336
+ // PHP 5.3 only
337
+ $json = \json_encode($input);
338
+ }
339
if ($errno = \json_last_error()) {
340
static::handleJsonError($errno);
341
} elseif ($json === 'null' && $input !== null) {
0 commit comments