code: func (wl *Basic) MarshalJSON() ([]byte, error) {
  	wl.lock.Lock()
  	defer wl.lock.Unlock()
  	var ss = make([]string, 0, len(wl.whitelist))
  	for ip := range wl.whitelist {
  		ss = append(ss, ip)
  	}
  
  	out := []byte(`"` + strings.Join(ss, ",") + `"`)
  	return out, nil
  }
docs: // MarshalJSON serialises a host whitelist to a comma-separated list of
  // hosts, implementing the json.Marshaler interface.