layout page title Filters › json_encode ← filters The json_encode filter returns the JSON representation of a value: {{ data|json_encode() }} For this filter you have to install any json package (cjson, json) or configure aspect.config manually.