aboutsummaryrefslogtreecommitdiffstats
path: root/book/src
diff options
context:
space:
mode:
authorLibravatar vallentin <mail@vallentin.dev>2020-12-29 23:55:48 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-12-30 07:29:40 +0100
commit483281a1161cb52ba89670219672ae2950c99092 (patch)
tree27ecbe1d8e2ea8100d29a94b34f957cffecc6e3a /book/src
parentcc2b8561826b34786cc33994c6725b35660cd6de (diff)
downloadaskama-483281a1161cb52ba89670219672ae2950c99092.tar.gz
askama-483281a1161cb52ba89670219672ae2950c99092.tar.bz2
askama-483281a1161cb52ba89670219672ae2950c99092.zip
Updated book to include tojson alias
Diffstat (limited to 'book/src')
-rw-r--r--book/src/filters.md4
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.