Adding custom indentation of YAML and JSON filters (#10008)

This commit is contained in:
Jiri Tyr
2016-06-14 15:07:34 +01:00
committed by Brian Coca
parent e1d248dddf
commit 27d065924f
2 changed files with 11 additions and 5 deletions

View File

@@ -25,6 +25,11 @@ For human readable output, you can use::
{{ some_variable | to_nice_json }}
{{ some_variable | to_nice_yaml }}
It's also possible to change the indentation of both::
{{ some_variable | to_nice_json(indent=2) }}
{{ some_variable | to_nice_yaml(indent=8) }}
Alternatively, you may be reading in some already formatted data::
{{ some_variable | from_json }}