Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL json >= 1.2.0
Returns the JSON representation of a value
json_encode(mixed $valueint $flags 0int $depth 512): string|false
        return [

            
'auth' => $this->getPublicToken().':'.$signature,

            
'channel_data' => json_encode($userData),

        ];

    }
    {

        return 
hash_hmac(

            
'sha256',

            
sprintf('%s:%s%s'$socketId$channelName$userData ':'.json_encode($userData) : ''),

            
$this->getPrivateToken(),

        );

    }
    {

        
$channels implode(', '$this->formatChannels($channels));



        
$payload json_encode($payloadJSON_PRETTY_PRINT);



        
$this->logger->info('Broadcasting ['.$event.'] on channels ['.$channels.'] with payload:'.PHP_EOL.$payload);

    }
        }



        
$settings $this->pusher->getSettings();

        
$encodedUser json_encode($user);

        
$decodedString "{$request->socket_id}::user::{$encodedUser}";



        
$auth $settings['auth_key'].':'.hash_hmac(
    public function validAuthenticationResponse($request$result)

    {

        if (
is_bool($result)) {

            return 
json_encode($result);

        }



        
$channelName $this->normalizeChannelName($request->channel_name);
                        $user->getAuthIdentifierForBroadcasting()

                        : 
$user->getAuthIdentifier();



        return 
json_encode(['channel_data' => [

            
'user_id' => $broadcastIdentifier,

            
'user_info' => $result,

        ]]);

    }
        $connection $this->redis->connection($this->connection);



        
$payload json_encode([

            
'event' => $event,

            
'data' => $payload,

            
'socket' => Arr::pull($payload'socket'),

        ]);



        try {

            
$connection->eval(
            return [

                
'pending_jobs' => $batch->pending_jobs 1,

                
'failed_jobs' => $batch->failed_jobs,

                
'failed_job_ids' => json_encode(array_values(array_diff(json_decode($batch->failed_job_idstrue), [$jobId]))),

            ];

        });
            return [

                
'pending_jobs' => $batch->pending_jobs,

                
'failed_jobs' => $batch->failed_jobs 1,

                
'failed_job_ids' => json_encode(array_values(array_unique(array_merge(json_decode($batch->failed_job_idstrue), [$jobId])))),

            ];

        });
        if (in_array(InteractsWithQueue::class, $uses) &&

            
in_array(Queueable::class, $uses) &&

            ! 
$command->job) {

            
$command->setJob(new SyncJob($this->containerjson_encode([]), 'sync''sync'));

        }



        if (
$handler || $handler $this->getCommandHandler($command)) {
    public function toJson($options 0)

    {

        return 
json_encode($this->jsonSerialize(), $options);

    }
            public function set($model$key$value$attributes)

            {

                return [
$key => json_encode($value)];

            }



            public function 
serialize($modelstring $key$value, array $attributes)
            public function set($model$key$value$attributes)

            {

                return [
$key => json_encode($value)];

            }

        };

    }
            public function set($model$key$value$attributes)

            {

                if (! 
is_null($value)) {

                    return [
$key => Crypt::encryptString(json_encode($value))];

                }



                return 
null;
            public function set($model$key$value$attributes)

            {

                if (! 
is_null($value)) {

                    return [
$key => Crypt::encryptString(json_encode($value))];

                }



                return 
null;