GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-146440: Add "array_hook" parameter to JSON decoders by jsbueno · Pull Request #146441 · python/cpython

Conversation

@jsbueno

@jsbueno jsbueno commented Mar 26, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Add "array_hook" parameter to JSON decoder #146440

📚 Documentation preview 📚: https://cpython-previews--146441.org.readthedocs.build/

  • Issue: Add "array_hook" parameter to JSON decoder #146440

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jsbueno added 2 commits March 25, 2026 22:55
@jsbueno
array_hook for JSON decoder
ced66ad
     Add array_hook parameter, to both
     Python and C implementations
@jsbueno
Update documentation for array_hook parameter
cdb6dcf
@bedevere-app

bedevere-app Bot commented Mar 26, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Mar 26, 2026
@jsbueno jsbueno changed the title Add json_array parameter to json.load and json.loads gh-146440: Add "array_hook" parameter to JSON decoders Mar 26, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Mar 26, 2026
Add "array_hook" parameter to JSON decoder #146440
Closed
blurb-it Bot and others added 2 commits March 26, 2026 02:06
@blurb-it
📜🤖 Added by blurb_it.
c7b77ee
@jsbueno
Fix typo in news blurb
be6cb37
mpkocher
mpkocher reviewed Mar 26, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2026-03-26-02-06-52.gh-issue-146440.HXjhQO.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

jsbueno added 2 commits March 26, 2026 01:33
@jsbueno
Fix doc formatting
2820503
@jsbueno
Doc typo
b079384
serhiy-storchaka
serhiy-storchaka reviewed Mar 26, 2026
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is simple enough, and I have no strong objections, although I do not see an immerse need of this feature.

Please add a What's New entry.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/json.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/json.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/json/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/json.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

brianschubert
brianschubert reviewed Mar 26, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2026-03-26-02-06-52.gh-issue-146440.HXjhQO.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner reviewed Mar 26, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2026-03-26-02-06-52.gh-issue-146440.HXjhQO.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

jsbueno added 5 commits March 26, 2026 15:06
@jsbueno
'What's New' entry
7ff9a73
@jsbueno
Remove redundant default parameters
47072c3
@jsbueno
Fix blurb content + formatting
9cd60a5
@jsbueno
Formatting and missing parameter to JSONDecoder
6e48297
@jsbueno
Reformat blurb
0eed2fb
@jsbueno
jsbueno requested a review from AA-Turner as a code owner March 26, 2026 18:26
@jsbueno
Merge branch 'main' into feature-json-array-hook
ee285ae
vstinner
vstinner reviewed Mar 26, 2026
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/json/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/json/decoder.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/json/decoder.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2026-03-26-02-06-52.gh-issue-146440.HXjhQO.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_json.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_json.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_json.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_json/test_decode.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/json.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

jsbueno and others added 7 commits March 26, 2026 18:49
@jsbueno @vstinner
Update Doc/whatsnew/3.15.rst
2942826
Co-authored-by: Victor Stinner <[email protected]>
@jsbueno
Linting fixes
227b52d
@jsbueno
Capitalization typo
58d8897
@jsbueno
PEP 7 + Py_IsNone macro in functions touched
2a9cdd5
@jsbueno
Revert "PEP 7 + Py_IsNone macro in functions touched"
9dc1258
This reverts commit 2a9cdd5.
@jsbueno
Change version to 'next'
fc82117
@jsbueno
Nested list + frozendict testcase
c4d6b37
@jsbueno

jsbueno commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

While we are at it, what about that flaky MacOS tkinter test? Can I just ignore it? Is there a place to re-run only it when it fails?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka
serhiy-storchaka approved these changes Mar 27, 2026
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Mar 27, 2026
vstinner
vstinner reviewed Mar 27, 2026
View reviewed changes
Comment thread Lib/json/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/json/__init__.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_json/test_decode.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_json/test_decode.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
Apply suggestions from code review
8ea13ff
Co-authored-by: Victor Stinner <[email protected]>
vstinner
vstinner approved these changes Mar 27, 2026
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It sounds like a reasonable addition for some specific use cases.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
Apply suggestions from code review
d1e2077
Co-authored-by: Victor Stinner <[email protected]>
@vstinner
vstinner enabled auto-merge (squash) March 27, 2026 10:45
@vstinner

vstinner commented Mar 27, 2026

Copy link
Copy Markdown
Member

While we are at it, what about that flaky MacOS tkinter test? Can I just ignore it? Is there a place to re-run only it when it fails?

Core developers can re-run failing jobs to ignore flaky issues. The tkinter failure is a flaky test, it's unrelated to your change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit d0061d5 into python:main Mar 27, 2026
52 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Mar 27, 2026
@vstinner

vstinner commented Mar 27, 2026

Copy link
Copy Markdown
Member

PR merged. Thanks for your nice contribution @jsbueno.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal pablogsal mentioned this pull request Apr 4, 2026
gh-130273: Fix traceback color output with unicode characters #142529
Merged
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Apr 16, 2026
@jsbueno @blurb-it
@vstinner @clin1234
pythongh-146440: Add array_hook parameter to JSON decoders (python#14…
90ce31c
…6441)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <[email protected]>
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@jsbueno @blurb-it
@vstinner @ljfp
pythongh-146440: Add array_hook parameter to JSON decoders (python#14…
3d3702f
…6441)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brianschubert brianschubert brianschubert left review comments
@vstinner vstinner vstinner approved these changes
@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
+1 more reviewer
@mpkocher mpkocher mpkocher left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@jsbueno @vstinner @mpkocher @serhiy-storchaka @brianschubert
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.