29 Mar
2014
29 Mar
'14
1:34 p.m.
Berker Peksag added the comment:
This implicit stringification of non-string dictionary keys does not currently appear to be documented.
I think this is part of the JSON spec. See http://json.org/object.gif for example. Also, this is already documented in the json.dumps() documentation:
Keys in key/value pairs of JSON are always of the type str. When a dictionary is converted into JSON, all the keys of the dictionary are coerced to strings.
http://docs.python.org/3.4/library/json.html#json.dumps ---------- nosy: +berker.peksag _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue21092> _______________________________________