<gh_stars>100-1000
try:
    from django.http import JsonResponse
except ImportError:
    from django.http import HttpResponse
    import json

    def JsonResponse(data):
        return HttpResponse(json.dumps(data),
                            content_type="application/json")

try:
    from django.http import JsonResponse
except ImportError:
    from django.http import HttpResponse
    import json

    def JsonResponse(data):
        return HttpResponse(json.dumps(data),
                            content_type="application/json")