'Change POST data to JSON string and mask data.'

def _get_request_param(self, request):

    params = {}
    try:
        params = request.POST.copy()
        if (not params):
            params = json.loads(request.body)
    except Exception:
        pass
    for key in params:
        if (key in self.mask_fields):
            params[key] = ('*' * 8)
    files = request.FILES.values()
    if (len(list(files)) > 0):
        filenames = ',    '.join([up_file.name for up_file in files])
        params['file_name'] = filenames
    return json.dumps(params, ensure_ascii=False)
