private static function jsonDecode(string $body)
    {
        $content = json_decode($body, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            $msg = json_last_error_msg();

            throw new DecodingFailedException(
                'Failed to decode the json response body.'.($msg ? " {$msg}." : '')
            );
        }

        if (!is_array($content)) {
            throw new DecodingFailedException(
                'Failed to decode the json response body. Expected to decode to an array.'
            );
        }

        return $content;
    }
private static function jsonDecode(string $body)
    {
        $content = json_decode($body, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            $msg = json_last_error_msg();

            throw new DecodingFailedException(
                'Failed to decode the json response body.'.($msg ? " {$msg}." : '')
            );
        }

        if (!is_array($content)) {
            throw new DecodingFailedException(
                'Failed to decode the json response body. Expected to decode to an array.'
            );
        }

        return $content;
    }
private static function jsonDecode ( string $ body ) { $ content = json_decode ( $ body , true ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { $ msg = json_last_error_msg ( ) ; throw new DecodingFailedException ( 'Failed to decode the json response body.' . ( $ msg ? " {$msg}." : '' ) ) ; } if ( ! is_array ( $ content ) ) { throw new DecodingFailedException ( 'Failed to decode the json response body. Expected to decode to an array.' ) ; } return $ content ; }
Decode the given JSON string to an array.

@param string $body

@throws \Bitbucket\Exception\DecodingFailedException

@return array
Decode the given JSON string to an array .