diff options
-rw-r--r-- | book/src/filters.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/book/src/filters.md b/book/src/filters.md index 47fafdb..db660a2 100644 --- a/book/src/filters.md +++ b/book/src/filters.md @@ -262,13 +262,15 @@ Enabling the `serde-json` feature will enable the use of the `json` filter. This will output formatted JSON for any value that implements the required `Serialize` trait. -``` +```jinja { "foo": "{{ foo }}", "bar": {{ bar|json }} } ``` +For compatibility with Jinja, `tojson` can be used in place of `json`. + ## The `yaml` filter Enabling the `serde-yaml` feature will enable the use of the `yaml` filter. |