add val|to_json template filter