Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL json >= 1.2.0
Decodes a JSON string
json_decode(    string $json,    ?bool $associative null,    int $depth 512,    int $flags 0): mixed
    protected function decodePusherResponse($request$response)

    {

        if (! 
$request->input('callback'false)) {

            return 
json_decode($responsetrue);

        }



        return 
response()->json(json_decode($responsetrue))
            return json_decode($responsetrue);

        }



        return 
response()->json(json_decode($responsetrue))

                    ->
withCallback($request->callback);

    }
            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])))),

            ];

        });
            (int) $batch->total_jobs,

            (int) 
$batch->pending_jobs,

            (int) 
$batch->failed_jobs,

            
json_decode($batch->failed_job_idstrue),

            
$this->unserialize($batch->options),

            
CarbonImmutable::createFromTimestamp($batch->created_at),

            
$batch->cancelled_at CarbonImmutable::createFromTimestamp($batch->cancelled_at) : $batch->cancelled_at,
            if ($value instanceof JsonSerializable) {

                return 
$value->jsonSerialize();

            } elseif (
$value instanceof Jsonable) {

                return 
json_decode($value->toJson(), true);

            } elseif (
$value instanceof Arrayable) {

                return 
$value->toArray();

            }
        } elseif ($items instanceof Arrayable) {

            return 
$items->toArray();

        } elseif (
$items instanceof Jsonable) {

            return 
json_decode($items->toJson(), true);

        } elseif (
$items instanceof JsonSerializable) {

            return (array) 
$items->jsonSerialize();

        } elseif (
$items instanceof Traversable) {
                    return;

                }



                
$data json_decode($attributes[$key], true);



                return 
is_array($data) ? new ArrayObject($data) : null;

            }
                    return;

                }



                
$data json_decode($attributes[$key], true);



                return 
is_array($data) ? new Collection($data) : null;

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

            {

                if (isset(
$attributes[$key])) {

                    return new 
ArrayObject(json_decode(Crypt::decryptString($attributes[$key]), true));

                }



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

            {

                if (isset(
$attributes[$key])) {

                    return new 
Collection(json_decode(Crypt::decryptString($attributes[$key]), true));

                }



                return 
null;
    public function fromJson($value$asObject false)

    {

        return 
json_decode($value, ! $asObject);

    }
    protected function getJsonPayload($payload)

    {

        
$payload json_decode(base64_decode($payload), true);
            return $this->namespace;

        }



        
$composer json_decode(file_get_contents($this->basePath('composer.json')), true);



        foreach ((array) 
data_get($composer'autoload.psr-4') as $namespace => $path) {

            foreach ((array) 
$path as $pathChoice) {
    public function data(): array

    {

        return 
json_decode(file_get_contents($this->path()), true);

    }