Use the entire event in the example JSON. Sort keys on JSON.
This commit is contained in:
parent
6d3dd045a5
commit
a7f3d39da2
2 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ def main(file_stream=None, out_dir=None):
|
|||
|
||||
# add a template filter to produce pretty pretty JSON
|
||||
def jsonify(input, indent=None, pre_whitespace=0):
|
||||
code = json.dumps(input, indent=indent)
|
||||
code = json.dumps(input, indent=indent, sort_keys=True)
|
||||
if pre_whitespace:
|
||||
code = code.replace("\n", ("\n" +" "*pre_whitespace))
|
||||
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
{% endfor %}
|
||||
Example::
|
||||
|
||||
{{example.content | jsonify(4, 4)}}
|
||||
{{example | jsonify(4, 4)}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue