Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: encoding duplicate struct keys fail silently (and does not report error) #17913
When due to a bug a structure has two fields with the same key like:
The JSON marshaller will silently ignore the fields. I would expect it to return an error to the caller.
Example program: https://play.golang.org/p/DOUbRT9k_U
What version of Go are you using (