code: func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
  	var ipnetStr string
  	if err = json.Unmarshal(b, &ipnetStr); err == nil {
  		var cidr *net.IPNet
  		if _, cidr, err = net.ParseCIDR(ipnetStr); err == nil {
  			*ipnet = NetIPNet(*cidr)
  		}
  	}
  	return
  }
docs: // UnmarshalJSON sets the IPNet from a byte array of JSON