title: failed to json.marshal map with non string keys
body: <p>I want to convert a <code>map[int]string</code> to <code>json</code>, so I thought <code>json.Marshal()</code> would do the trick, but it fails saying unsupported type <code>map[int]string</code>. But whereas if I use a <code>map</code> with key string it works fine.</p>
  
  <p><a href="http://play.golang.org/p/qhlS9Nt8qQ" rel="nofollow">http://play.golang.org/p/qhlS9Nt8qQ</a></p>
  
  <p>Later on inspection of the marshaller code, there is an explicit check to see if the key is not string and returns <code>UnsupportedTypeError</code>...</p>
  
  <p>Why can't I even use primitives as keys? If json standard doesn't allow non string keys, shouldn't <code>json.Marshal</code> convert the primitives to string and use them as keys ?</p>