def JSONResponse(payload):
    return HttpResponse(json.dumps(payload), mimetype='application/json')
Helper to return HttpResponse with json type
dataset/ETHPy150Open haystack/eyebrowse-server/common/view_helpers.py/JSONResponse