﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17942	JSONResponse class for API responses	Leah Culver	Łukasz Balcerzak	"To make APIs, many developers have created their own JSONResponse classes which are subclasses of Response but returning JSON and with the proper mimetype (""application/json"").

Some examples:

* https://gist.github.com/1265346
* https://github.com/coderanger/statusboard/blob/master/statusboard/utils/json.py
* http://chronosbox.org/blog/jsonresponse-in-django
* http://djangosnippets.org/search/?q=jsonresponse

Related to this wiki page: https://code.djangoproject.com/wiki/AJAX

This patch should include:

* mimetype ""application/json""

Optional ideas:

* support for a callback parameter for JSON-P style responses (see https://gist.github.com/1265346)
* more status codes (see https://gist.github.com/1265346)
* option to pass a model with a ""to_dict"", ""to_list"", or ""to_json"" function (see https://github.com/coderanger/statusboard/blob/master/statusboard/utils/json.py)
* support for XML, if anyone likes to make XML APIs anymore?"	New feature	closed	HTTP handling	dev	Normal	fixed	dceu13	noah@… eromijn@… tom@…	Accepted	1	0	1	1	0	0
