code: func (c Config) MarshalJSON() ([]byte, error) {
  	m := map[string]interface{}{
  		"version":  c.Version,
  		"services": c.Services,
  	}
  
  	if len(c.Networks) > 0 {
  		m["networks"] = c.Networks
  	}
  	if len(c.Volumes) > 0 {
  		m["volumes"] = c.Volumes
  	}
  	if len(c.Secrets) > 0 {
  		m["secrets"] = c.Secrets
  	}
  	if len(c.Configs) > 0 {
  		m["configs"] = c.Configs
  	}
  	for k, v := range c.Extras {
  		m[k] = v
  	}
  	return json.Marshal(m)
  }
docs: // MarshalJSON makes Config implement json.Marshaler