-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Currently there seems to be no correlation between this package's optional tag and for example the json omitempty tag. I.e. if I specify a field in this package to be optional, I'd expect it to automatically add omitempty to json fields and not just blindly copy the original tags. This would be beneficial because it would avoid needing to specify both optional and omitempty.
Now I do know that optional is used during unmarshaling and omitempty during marshaling, so there is a case for the current behavior too. Just figured I'd raise this since I slipped up on this at my first go.
Metadata
Metadata
Assignees
Labels
No labels