def to_json(request):
    """Takes DmailRequest and turns it into a json object (dict)"""
    return {
        'whoami': request.whoami,
        'parameter': request.parameter,
        'data': request.data,
    }