You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2025. It is now read-only.
Application JSON data coming in (or going out) should not know (or reveal) anything about our underlying implementation model. For a given struct like:
typeMystruct {
IP pgtype.InetMAC pgtype.Macaddr
}
Populated accordingly, it would be reasonable for json.Marshall to deliver bytes equivalent to (for example):
{"IP":"192.0.2.1/32","MAC":"00:0a:95:9d:68:16"}
Symmetrically, json.Unmarshal should be able reconstitute the struct from the serialized JSON. Can probably submit a PR for some of this if you concur. Currently that would give an error like:
json: cannot unmarshal string into Go struct field My.IP of type pgtype.Inet