#17942: JSONResponse class for API responses
-------------------------------+--------------------
     Reporter:  leahculver     |      Owner:  nobody
         Type:  New feature    |     Status:  new
    Component:  Uncategorized  |    Version:  1.3
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 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?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17942>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to