gh-132021: Add bool type to the list of allowed JSON key types#132048
gh-132021: Add bool type to the list of allowed JSON key types#132048hugovk merged 6 commits intopython:mainfrom
Conversation
… in keys of encode(...) method
|
Hi! This updates the docstring for |
Lib/json/encoder.py
Outdated
|
|
||
| If skipkeys is false, then it is a TypeError to attempt | ||
| encoding of keys that are not str, int, float or None. If | ||
| encoding of keys that are not bool, str, int, float or None. If |
There was a problem hiding this comment.
nitpick: json.dumps uses the order "str, int, float, bool, None" in its docstring and docs, so we might as well use the same order here for consistency
|
Thanks @srinivasreddy for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @srinivasreddy for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…ythonGH-132048) (cherry picked from commit 403886c) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com> Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
…ythonGH-132048) (cherry picked from commit 403886c) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com> Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
GH-132255 is a backport of this pull request to the 3.13 branch. |
|
GH-132256 is a backport of this pull request to the 3.12 branch. |
…GH-132048) (#132256) gh-132021: Add bool type to the list of allowed JSON key types (GH-132048) (cherry picked from commit 403886c) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com> Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
…GH-132048) (#132255) gh-132021: Add bool type to the list of allowed JSON key types (GH-132048) (cherry picked from commit 403886c) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com> Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.