i've this template:
var ListTemplate = `
{
"resources": [
{{ StringsJoin . ", " }}
]
}
`
rendered with:
JoinFunc := template.FuncMap{"StringsJoin": strings.Join}
tmpl := template.Must(template.New("").Funcs(JoinFunc).Parse(ListTemplate))
if i send it to a http.ResponseWriter the output text is escaped.
var list []string
tmpl.Execute(w, list)
how can i write a json this way?