Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User struct doesn't allow send to Zendesk bool values to false #216

Open
angel89ll opened this issue Feb 10, 2022 · 0 comments
Open

User struct doesn't allow send to Zendesk bool values to false #216

angel89ll opened this issue Feb 10, 2022 · 0 comments

Comments

@angel89ll
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant