-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-131952: Add color to the json
CLI
#132126
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
cae293f
Add color to the json.tool CLI output
tomasr8 1854ae5
Add news entry
tomasr8 ee39cb2
Fix escaped quotes
tomasr8 5e726ee
Fix tests
tomasr8 848a7be
Fix the tests for real this time
tomasr8 8d90ccb
Fix tests on Windows
tomasr8 93e4306
Sort imports
tomasr8 f8d697a
Fix string regex
tomasr8 429e350
Handle NaN & Infinity
tomasr8 0abe76a
Use only digits in number regex
tomasr8 1acd35d
Remove non-greedy matching in string regex
tomasr8 691aecd
Test unicode
tomasr8 5afac97
Pass the file to `can_colorize`
tomasr8 911f75f
Make the test file runnable
tomasr8 4c27be7
Use force_not_colorized
tomasr8 18ce6fa
Remove unused variable
tomasr8 18f7ae5
🦭
tomasr8 b5157af
Add a comment to the color regex
tomasr8 d7287e2
Move helper functions to the start
tomasr8 177107b
Make helper functions private
tomasr8 b7589be
Prefer global functions
tomasr8 e744290
Remove redundant comments
tomasr8 fac39c7
Improve news entry
tomasr8 4f399be
Highlight keys in a different color
tomasr8 8bd0a36
Improve color contrast
tomasr8 37d4c08
Tone down the colors a bit
tomasr8 1e6f4ea
Use bold colors & fix tests
tomasr8 cc92518
Use default color for numbers
tomasr8 4fc5e27
Add What's New entry
tomasr8 a489649
Simplify code
tomasr8 789ca88
Lint fix
tomasr8 ce75f86
Fix typo
tomasr8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Library/2025-04-05-16-05-34.gh-issue-131952.HX6gCX.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add color output to the :program:`json` CLI. Patch by Tomas Roun. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.