code: func writeJSONResponse(response *restful.Response, data []byte) {
  	if data == nil {
  		response.WriteHeader(http.StatusOK)
  		// do not write a nil representation
  		return
  	}
  	response.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON)
  	response.WriteHeader(http.StatusOK)
  	if _, err := response.Write(data); err != nil {
  		klog.Errorf("Error writing response: %v", err)
  	}
  }
docs: // Derived from go-restful writeJSON.