Explain how I justified to myself making JsonResource not always send JSON.

This commit is contained in:
David Baker 2015-04-01 15:13:14 +01:00
parent e9c908ebc0
commit c5bf0343e8

View File

@ -79,6 +79,13 @@ class JsonResource(HttpServer, resource.Resource):
Resources.
Register callbacks via register_path()
Callbacks can return a tuple of status code and a dict in which case the
the dict will automatically be sent to the client as a JSON object.
The JsonResource is primarily intended for returning JSON, but callbacks
may send something other than JSON, they may do so by using the methods
on the request object and instead returning None.
"""
isLeaf = True