func JSON(w http.ResponseWriter, r *http.Request, v interface{}) {
	if err, ok := v.(error); ok {
		v = errorf(r, err)
	}

	render.JSON(w, r, v)
}
// JSON marshals 'v' to JSON, automatically escaping HTML and setting the
// Content-Type as application/json.
JSON marshals 'v' to JSON, automatically escaping HTML and setting the
Content-Type as application/json.
// JSON marshals ' v ' to JSON automatically escaping HTML and setting the // Content - Type as application / json .
func JSON(w http.ResponseWriter, r *http.Request, v interface{}) {
	if err, ok := v.(error); ok {
		v = errorf(r, err)
	}
	render.JSON(w, r, v)
}
func JSON ( w http . ResponseWriter , r * http . Request , v interface { } ) { if err , ok := v . ( error ) ; ok { v = errorf ( r , err ) } render . JSON ( w , r , v ) }
JSON marshals 'v' to JSON, automatically escaping HTML and setting the
Content-Type as application/json.
JSON marshals ' v ' to JSON automatically escaping HTML and setting the Content - Type as application / json .