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
When unmarshaling, the tag jsonInternal could be specified to unmarshal using the internal names, while when marshaling the normal json tag would be used (by default).
The current workaround is having two structs with identical fields but different tags, which feels messy.
The text was updated successfully, but these errors were encountered:
I think it should be possible to specify a different tag name that should be used when marshallng JSON.
An example use case would be a proxy renaming fields between an internal and external API:
When unmarshaling, the tag
jsonInternal
could be specified to unmarshal using the internal names, while when marshaling the normaljson
tag would be used (by default).The current workaround is having two structs with identical fields but different tags, which feels messy.
The text was updated successfully, but these errors were encountered: