why not add a MarshalJSON method to your map?
I don't think encoding/json should handle this special case as
it will open up a lot of design questions.
What about map[float64]string and map[complex128]string?
Should encoding/json also handle those? Which string format
should it choose?
This week I added 100+ lines of code to one of our packages to support MarshalJSON and UnmarshalJSON map[int]OurType. I also added 130+ lines of unit tests. While in the standard lib code, I could see it would be far fewer lines based on all of the unexported types and utility functions.
I would love to add this to the standard lib. What is the process for getting an issue approved and assigned?