private function decodeBody(): void
    {
        if (empty($this->body) || $this->body === null) {
            $this->decodedBody = [];

            return;
        }

        $this->decodedBody = json_decode($this->body, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new JsonException('The body of the response could not be decoded as JSON.');
        }

        if (!\is_array($this->decodedBody)) {
            $this->decodedBody = [];
        }
    }
private function decodeBody(): void
    {
        if (empty($this->body) || $this->body === null) {
            $this->decodedBody = [];

            return;
        }

        $this->decodedBody = json_decode($this->body, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new JsonException('The body of the response could not be decoded as JSON.');
        }

        if (!\is_array($this->decodedBody)) {
            $this->decodedBody = [];
        }
    }
private function decodeBody ( ) : void { if ( empty ( $ this -> body ) || $ this -> body === null ) { $ this -> decodedBody = [ ] ; return ; } $ this -> decodedBody = json_decode ( $ this -> body , true ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new JsonException ( 'The body of the response could not be decoded as JSON.' ) ; } if ( ! \ is_array ( $ this -> decodedBody ) ) { $ this -> decodedBody = [ ] ; } }
Converts the raw response into an array.

@throws JsonException If the response body failed to be decoded as JSON
Converts the raw response into an array .