private function generate(
        string $identifier,
        string $method,
        string $timestamp,
        string $uri,
        string $content
    ) : string {
        $payload = [
            'id' => $identifier,
            'method' => strtoupper($method),
            'timestamp' => $timestamp,
            'uri' => rtrim($uri, '/')
        ];

        if (is_null(json_decode($content))) {
            $payload = array_merge($payload, [
                'content' => $content
            ]);
        } else {
            $payload = array_merge($payload, [
                'content' => json_encode(
                    json_decode($content),
                    JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
                )
            ]);
        }

        return json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    }
private function generate(
        string $identifier,
        string $method,
        string $timestamp,
        string $uri,
        string $content
    ) : string {
        $payload = [
            'id' => $identifier,
            'method' => strtoupper($method),
            'timestamp' => $timestamp,
            'uri' => rtrim($uri, '/')
        ];

        if (is_null(json_decode($content))) {
            $payload = array_merge($payload, [
                'content' => $content
            ]);
        } else {
            $payload = array_merge($payload, [
                'content' => json_encode(
                    json_decode($content),
                    JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
                )
            ]);
        }

        return json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    }
private function generate ( string $ identifier , string $ method , string $ timestamp , string $ uri , string $ content ) : string { $ payload = [ 'id' => $ identifier , 'method' => strtoupper ( $ method ) , 'timestamp' => $ timestamp , 'uri' => rtrim ( $ uri , '/' ) ] ; if ( is_null ( json_decode ( $ content ) ) ) { $ payload = array_merge ( $ payload , [ 'content' => $ content ] ) ; } else { $ payload = array_merge ( $ payload , [ 'content' => json_encode ( json_decode ( $ content ) , JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ] ) ; } return json_encode ( $ payload , JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) ; }
Generates a payload with the provided properties

@param string $identifier
@param string $method
@param string $timestamp
@param string $uri
@param string $content

@return string
Generates a payload with the provided properties