code: func (r *Result) WriteJSON(path string) error {
  	fd, err := os.Create(path)
  	if err != nil {
  		return err
  	}
  	defer fd.Close()
  	return json.NewEncoder(fd).Encode(r)
  }
docs: // WriteJSON writes Result as a JSON document to the specified path.