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
Since 'User' struct is using 'omitempty' tag and it is no using bool pointers, when you set a bool field to false (for example 'Suspended'), json Marshal function will return a json without that bool field. This is because of empty value for bool fields is 'false'. For more information see: https://pkg.go.dev/encoding/json#Marshal
It will be the same issue for int fields.
If you want to replicate the issue, try to unsuspend a user previously suspended.
The text was updated successfully, but these errors were encountered:
Since 'User' struct is using 'omitempty' tag and it is no using bool pointers, when you set a bool field to false (for example 'Suspended'), json Marshal function will return a json without that bool field. This is because of empty value for bool fields is 'false'. For more information see: https://pkg.go.dev/encoding/json#Marshal
It will be the same issue for int fields.
If you want to replicate the issue, try to unsuspend a user previously suspended.
The text was updated successfully, but these errors were encountered: