How about a JsonResponse here instead?
https://github.com/edx/edx-platform/blob/master/common/djangoapps/util/json_request.py#L29