So, the JSON requirement for string-only dictionary keys is enforced by Go, which is fine. However, Go does not accommodate any custom encoders/decoders that might help the developer get around this. I was trying to investigate where in the JSON code this became an error in order to see if I could quickly throw-together a PR to add this, but I'm having difficulty. For your convenience, this is a walkthrough of the execution path and why it seems I'm getting mixed signals about whether this should actually be a problem.
I'm running on master (>1.7.1), by the way.
If a map needs to be marshaled, and we don't yet have a cached encoder for a map, newTypeEncoder() creates a mapEncoder struct:
newMapEncoder() seems to approve of a multitude of different key types, not just string:
I was looking to understand the mechanics and to potentially extend the package. I don't know if the wiki/forum would be sufficient.
I'm running from AppEngine and I had provided a path with the current version of AppEngine, which I had compiled a few minutes before, without realizing that Go had been built-into the SDK (which makes sense). The SDK isn't yet available with something newer than 1.6.2 and the version in production probably isn't available with anything later yet. On the off-chance that you or someone listening happens to know if there's a newer version in production and how to update the AppEngine SDK to use the newer one (it needs the "goapp" binary) than I'm going to be stuck having to pre-translate my keys.