encoding/json: duplicate struct tags cause json.Marshal to silently fail #28288
Labels
Milestone
Comments
This is documented, so it cannot be changed - https://golang.org/pkg/encoding/json/:
The same issue has been raised before, too. See #17913 for example. |
Thank you for your comments. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What did you do?
Marshal a struct containing duplicate struct tags silently produces an empty json struct.
Example:
What did you expect to see?
json.Marshal
gives an error.What did you see instead?
json.Marshal
silently returns an empty json struct.System details
The text was updated successfully, but these errors were encountered: