server/middleware: pretty-print JSON
This commit is contained in:
parent
769ef8f141
commit
583e73dfc7
|
@ -41,4 +41,5 @@ class JsonTranslator(object):
|
|||
''' Executed before passing the response to falcon. '''
|
||||
if 'result' not in request.context:
|
||||
return
|
||||
response.body = json.dumps(request.context.result, default=json_serial)
|
||||
response.body = json.dumps(
|
||||
request.context.result, default=json_serial, indent=2)
|
||||
|
|
Loading…
Reference in New Issue