Lint your JSON files!
Project description
json-linter
Lint your JSON files!
Features
- Check if keys are sorted alphabetically...
- ...and automatically fix (some) of these issues!
Install
You need to have Python 3.10+ installed.
$ pip install json-linter
Usage
# Lint a single file...
$ json-linter my-file.json
- my-file.json
rule_keys_are_sorted
# Lint multiple files...
$ json-linter a.json b.json
- a.json
rule_keys_are_sorted
+ b.json
# Lint all files in a directory
$ json-linter files
- files/a.json
rule_keys_are_sorted
+ files/b.json
# Lint all files in a directory recursively
$ json-linter files --recursive
- files/in/a/subdirectory/a.json
rule_keys_are_sorted
# ...
# Lint all files in a directory recursively with .config and .cfg ending
$ json-linter files -r --extensions cfg config
- files/in/a/subdirectory/a.cfg
rule_keys_are_sorted
+ files/in/a/subdirectory/b.config
# ...
# Fix files (will overwrite the file with a fixed version and then lint)
$ json-linter my-file.json --fix
+ my-file.json
License
GNU General Public License v3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for json_linter-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec96b2e8c648109902760c3511cf1f73787f34e66d3d618b709c3408de94c54 |
|
MD5 | 5d737fbeb495ec8d6173a43452757b06 |
|
BLAKE2b-256 | 08c1dcefc8c50892a64268ccb16cd9236323634465304560e42d0c8cd1f38b1d |