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

Set empty arrays as empty slices #9

Closed
emmanuelm41 opened this issue Dec 14, 2023 · 0 comments · Fixed by #11
Closed

Set empty arrays as empty slices #9

emmanuelm41 opened this issue Dec 14, 2023 · 0 comments · Fixed by #11

Comments

@emmanuelm41
Copy link

When decoding a response, slices that has no elements inside are not set as empty slices. This issue makes JSON Marshalling process transform them into nil, instead of []. For context, this is actually required in order to generate canonical JSONs equally on Golang, Rust and JS. The default value on other languages is to convert it to [] instead of nil.

References:

@q-uint q-uint mentioned this issue Dec 15, 2023
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