server/middleware: pretty-print JSON

This commit is contained in:
rr- 2016-04-02 14:45:06 +02:00
parent 769ef8f141
commit 583e73dfc7
1 changed files with 2 additions and 1 deletions

View File

@ -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)