diff options
author | vallentin <mail@vallentin.dev> | 2020-12-29 23:55:48 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-12-30 07:29:40 +0100 |
commit | 483281a1161cb52ba89670219672ae2950c99092 (patch) | |
tree | 27ecbe1d8e2ea8100d29a94b34f957cffecc6e3a | |
parent | cc2b8561826b34786cc33994c6725b35660cd6de (diff) | |
download | askama-483281a1161cb52ba89670219672ae2950c99092.tar.gz askama-483281a1161cb52ba89670219672ae2950c99092.tar.bz2 askama-483281a1161cb52ba89670219672ae2950c99092.zip |
Updated book to include tojson alias
-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. |