You can create your own filter to_pretty_json. First of all, you should wrap json.dumps()in a new function, and then register it as a jinja filter :
import json
def to_pretty_json(value):
return json.dumps(value, sort_keys=True,
indent=4, separators=(',', ': '))
app.jinja_env.filters['tojson_pretty'] = to_pretty_json
:
<table>
{% for test in list_of_decoded_json %}
<tr>
<td><pre>{{ test|tojson_pretty|safe }}</pre></td>
</tr>
{% endfor %}
</table>