This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年03月29日 02:02 by cvrebert, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg215105 - (view) | Author: Chris Rebert (cvrebert) * | Date: 2014年03月29日 02:02 | |
Python 3.3.4 (default, Feb 21 2014, 18:00:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from json import dumps
>>> dumps({True: True, False: False, None: None, 42: 42})
'{"false": false, "true": true, "42": 42, "null": null}'
>>>
This implicit stringification of non-string dictionary keys does not currently appear to be documented.
|
|||
| msg215129 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2014年03月29日 13:34 | |
> 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 |
|||
| msg233847 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年01月11日 13:23 | |
New changeset 36099a05d76a by Mark Dickinson in branch 'default': Issue #21092: Merge from 3.4. https://hg.python.org/cpython/rev/36099a05d76a |
|||
| msg233849 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2015年01月11日 13:28 | |
Sorry; that last commit message should have been for #21902. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:00 | admin | set | github: 65291 |
| 2015年01月11日 13:28:15 | mark.dickinson | set | nosy:
+ mark.dickinson messages: + msg233849 |
| 2015年01月11日 13:23:42 | python-dev | set | nosy:
+ python-dev messages: + msg233847 |
| 2014年03月29日 13:39:11 | brett.cannon | set | status: open -> closed resolution: not a bug |
| 2014年03月29日 13:34:14 | berker.peksag | set | nosy:
+ berker.peksag messages: + msg215129 |
| 2014年03月29日 02:02:12 | cvrebert | create | |