code: func (i *IPAMData) MarshalJSON() ([]byte, error) {
  	m := map[string]interface{}{}
  	m["AddressSpace"] = i.AddressSpace
  	if i.Pool != nil {
  		m["Pool"] = i.Pool.String()
  	}
  	if i.Gateway != nil {
  		m["Gateway"] = i.Gateway.String()
  	}
  	if i.AuxAddresses != nil {
  		am := make(map[string]string, len(i.AuxAddresses))
  		for k, v := range i.AuxAddresses {
  			am[k] = v.String()
  		}
  		m["AuxAddresses"] = am
  	}
  	return json.Marshal(m)
  }
docs: // MarshalJSON encodes IPAMData into json message