code: func (ts *TrackerStats) MarshalJSON() (data []byte, err error) {
  	// Shadow real type for regular unmarshalling
  	type RawTrackerStats TrackerStats
  	tmp := struct {
  		LastAnnounceStartTime int64 `json:"lastAnnounceStartTime"`
  		LastAnnounceTime      int64 `json:"lastAnnounceTime"`
  		LastScrapeStartTime   int64 `json:"lastScrapeStartTime"`
  		LastScrapeTime        int64 `json:"lastScrapeTime"`
  		LastScrapeTimedOut    int64 `json:"lastScrapeTimedOut"`
  		NextAnnounceTime      int64 `json:"nextAnnounceTime"`
  		NextScrapeTime        int64 `json:"nextScrapeTime"`
  		*RawTrackerStats
  	}{
  		LastAnnounceStartTime: ts.LastAnnounceStartTime.Unix(),
  		LastAnnounceTime:      ts.LastAnnounceTime.Unix(),
  		LastScrapeStartTime:   ts.LastScrapeStartTime.Unix(),
  		LastScrapeTime:        ts.LastScrapeTime.Unix(),
  		NextAnnounceTime:      ts.NextAnnounceTime.Unix(),
  		NextScrapeTime:        ts.NextScrapeTime.Unix(),
  		RawTrackerStats:       (*RawTrackerStats)(ts),
  	}
  	// Convert real bool to its number form
  	if ts.LastScrapeTimedOut {
  		tmp.LastScrapeTimedOut = 1
  	}
  	// MarshalJSON allows to convert back golang values to original payload values
  	return json.Marshal(&tmp)
  }
docs: // MarshalJSON allows to convert back golang values to original payload values.