Skip to content

Commit

Permalink
Fixed json renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
eeonevision committed Jan 10, 2023
1 parent 3dea0bc commit d0b7ad2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions render/json.go
Expand Up @@ -54,8 +54,7 @@ var (

// Render (JSON) writes data with custom ContentType.
func (r JSON) Render(w http.ResponseWriter) (err error) {
r.WriteContentType(w)
return json.NewEncoder(w).Encode(r.Data)
return WriteJSON(w, r.Data)
}

// WriteContentType (JSON) writes JSON ContentType.
Expand Down

0 comments on commit d0b7ad2

Please sign in to comment.