@classmethod
def request_payload(cls, request, request_id):
    """JSON v2 request (or notification) payload."""
    payload = {'jsonrpc': '2.0', 'method': request.method}
    if request_id is not None:
        payload['id'] = request_id
    if request.args or request.args == {}:
        payload['params'] = request.args
    return payload
