code: func (i *IPAMData) UnmarshalJSON(data []byte) error {
  	var (
  		m   map[string]interface{}
  		err error
  	)
  	if err := json.Unmarshal(data, &m); err != nil {
  		return err
  	}
  	i.AddressSpace = m["AddressSpace"].(string)
  	if v, ok := m["Pool"]; ok {
  		if i.Pool, err = types.ParseCIDR(v.(string)); err != nil {
  			return err
  		}
  	}
  	if v, ok := m["Gateway"]; ok {
  		if i.Gateway, err = types.ParseCIDR(v.(string)); err != nil {
  			return err
  		}
  	}
  	if v, ok := m["AuxAddresses"]; ok {
  		b, _ := json.Marshal(v)
  		var am map[string]string
  		if err = json.Unmarshal(b, &am); err != nil {
  			return err
  		}
  		i.AuxAddresses = make(map[string]*net.IPNet, len(am))
  		for k, v := range am {
  			if i.AuxAddresses[k], err = types.ParseCIDR(v); err != nil {
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: // UnmarshalJSON decodes a json message into IPAMData