to json
Table of contents
Turns input into JSON, when possible. If input cannot be turned into JSON object, the filter just returns the input again.
{% comment %}
Input
{% endcomment %}
{{ site | to_json }}
// Output
{"id": 783, "content_type": { "name": "site", "title": "Site" }, "name": "A beautiful Site", ...}
Vul hier uw eigen inhoud in.