I want to convert a
json, so I thought
json.Marshal() would do the trick, but it fails saying unsupported type
map[int]string. But whereas if I use a
map with key string it works fine.
Later on inspection of the marshaller code, there is an explicit check to see if the key is not string and returns
Why can't I even use primitives as keys? If json standard doesn't allow non string keys, shouldn't
json.Marshal convert the primitives to string and use them as keys ?