- super(JSONResponse, self).__init__(
- json.dumps(data, cls=ExtendedEncoder),
- mimetype="application/json", **kwargs)
+ data = json.dumps(data, cls=ExtendedEncoder)
+ super(JSONResponse, self).__init__(data, content_type="application/json", **kwargs)