Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-122873: Allow "python3 -m json" to work #122884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
27e449d
Rename json.tool to json.__main__
treyhunner Aug 1, 2024
423c971
Make json.tool delegate to json.__main__
treyhunner Aug 1, 2024
1c1a8fa
Note json.tool deprecation
treyhunner Aug 1, 2024
f8f6931
Move main function from json.__main__ to json.tool
treyhunner Aug 2, 2024
834fbd7
Remove deprecation warning
treyhunner Aug 9, 2024
62afcf1
Fix module name as shown at command-line
treyhunner Aug 10, 2024
f58e60a
Update docs and what's new for json.tool to json
treyhunner Aug 10, 2024
168082a
Remove duplicate json module description from docs
treyhunner Aug 10, 2024
52039ee
Give up on marking `-m` as an option
treyhunner Aug 10, 2024
2e37475
Remove unnecessary newline in changed note
treyhunner Aug 10, 2024
efd0503
Remove now-invalid json.tool module reference
treyhunner Aug 10, 2024
c6bb211
Add news entry with blurb
treyhunner Aug 10, 2024
e768e39
Remove older raw string usage in docstring
treyhunner Aug 10, 2024
a6b5c0d
Use sentence case in section title
treyhunner Aug 10, 2024
3105bc2
Add CLI invocation for easier copy-pasting
treyhunner Aug 10, 2024
238fc57
Update json.__init__ docstring for python -m json
treyhunner Aug 10, 2024
7f704bf
Note `python -m json` in What's New
treyhunner Aug 10, 2024
fba68ac
Use SystemExit consistently in json package
treyhunner Aug 10, 2024
8662c81
Improve grammar in news
treyhunner Aug 12, 2024
52129e6
Add json.tool submodule documentation reference back in.
treyhunner Aug 12, 2024
016206d
Note that json.tool still works for compatibility reasons
treyhunner Aug 12, 2024
9b22285
Note that json.tool implements the CLI
treyhunner Aug 12, 2024
9fd0c1c
Reference json.__main__ in json.tool docstring
treyhunner Aug 12, 2024
734fbf9
Switch json.tool to json on listing of Python CLIs
treyhunner Aug 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Give up on marking -m as an option
  • Loading branch information
treyhunner committed Aug 10, 2024
commit 52039ee1c2072d02a0b45b0ecd560dc866c8fbb4
2 changes: 1 addition & 1 deletion 2 Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ Command-Line Interface
--------------

The :mod:`json` module can be invoked as a script,
using the interpreter's :option:`-m` switch,
using the interpreter's ``-m`` switch,
to validate and pretty-print JSON objects.
treyhunner marked this conversation as resolved.
Show resolved Hide resolved

If the optional ``infile`` and ``outfile`` arguments are not
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.