
from django.http import HttpResponse
from django.utils import simplejson

def JSONResponse(data):
    return HttpResponse(simplejson.dumps(data), mimetype='application/json')



from django.http import HttpResponse
import json

def JSONResponse(data):
    return HttpResponse(json.dumps(data), content_type='application/json')


Fix JSONResponse to work without complaints on django 1.6
Fix JSONResponse to work without complaints on django 1.6

  
  from django.http import HttpResponse
- from django.utils import simplejson
+ import json
  
  def JSONResponse(data):
-     return HttpResponse(simplejson.dumps(data), mimetype='application/json')
+     return HttpResponse(json.dumps(data), content_type='application/json')
  
  
Fix JSONResponse to work without complaints on django 1.6
## Code Before:

from django.http import HttpResponse
from django.utils import simplejson

def JSONResponse(data):
    return HttpResponse(simplejson.dumps(data), mimetype='application/json')


## Instruction:
Fix JSONResponse to work without complaints on django 1.6
## Code After:

from django.http import HttpResponse
import json

def JSONResponse(data):
    return HttpResponse(json.dumps(data), content_type='application/json')

