Uh oh!
There was an error while loading. Please reload this page.
PEP 837: Extensible JSON serialization - #5031
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Documentation build overview
11 files changed · |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
serhiy-storchaka
commented
Jul 12, 2026
Discussion thread: https://discuss.python.org/t/pep-837-extensible-json-serialization/108124 (Discussions-To and Post-History headers added). |
hugovk
left a comment
There was a problem hiding this comment.
I probably won't have time for a full review due to EuroPython, here's a couple of suggestions.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Also fix the markup of the '__raw_json__ as a pure marker' bullet (inline markup cannot be nested) and escape numpy.bool_ in the appendix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
serhiy-storchaka
commented
Jul 12, 2026
Thank you. Fixed rendering and modernized cpython-issue references. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # .github/CODEOWNERS
PEP 837 was freed for this PEP's earlier claim when the conflicting PEP was renumbered to 840 in python#5043. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hugovk
left a comment
There was a problem hiding this comment.
Approved with date change, thanks! :)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
serhiy-storchaka
commented
Jul 18, 2026
Thank you for review. |
New PEP proposing an extension mechanism for the
jsonencoder atthree levels: the
__json__()/__raw_json__()protocol (librarylevel), a
copyreg.json()registry following thecopyreg.pickle()precedent (application level), and a per-encoder
dispatch_tableattribute mirroring
pickle.Pickler(call level).Reference implementation: python/cpython branch
json-customize4(link: https://github.com/serhiy-storchaka/cpython/tree/json-customize4).
The idea has been discussed repeatedly since 2010; see the PEP's
Motivation for the tracker issues and the python-ideas /
discuss.python.org threads:
2010,
2019,
2020,
2022 (registry),
2022–2024 (
__json__).Basic requirements (all PEP Types)
pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) andPEPheaderAuthororSponsor, and formally confirmed their approvalAuthor,Status(Draft),TypeandCreatedheaders filled out correctlyPEP-Delegate,Topic,RequiresandReplacesheaders completed if appropriate (none applicable).github/CODEOWNERSfor the PEPStandards Track requirements
🤖 Generated with Claude Code