code: func JSON(w http.ResponseWriter, r *http.Request, v interface{}) {
  	buf := &bytes.Buffer{}
  	enc := json.NewEncoder(buf)
  	enc.SetEscapeHTML(true)
  	if err := enc.Encode(v); err != nil {
  		http.Error(w, err.Error(), http.StatusInternalServerError)
  		return
  	}
  
  	w.Header().Set("Content-Type", "application/json; charset=utf-8")
  	if status, ok := r.Context().Value(StatusCtxKey).(int); ok {
  		w.WriteHeader(status)
  	}
  	w.Write(buf.Bytes())
  }
docs: // JSON marshals 'v' to JSON, automatically escaping HTML and setting the
  // Content-Type as application/json.