Skip to content

Commit 3215478

Browse files
authored
Merge pull request #12 from sheremetat/master
Added charset UTF-8 to JSON renderer function
2 parents 8c8c7a4 + a0a517c commit 3215478

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

responder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func JSON(w http.ResponseWriter, r *http.Request, v interface{}) {
9999
return
100100
}
101101

102-
w.Header().Set("Content-Type", "application/json")
102+
w.Header().Set("Content-Type", "application/json; charset=utf-8")
103103
if status, ok := r.Context().Value(StatusCtxKey).(int); ok {
104104
w.WriteHeader(status)
105105
}

0 commit comments

Comments
 (0)