Lint your JSON files!
Project description
json-linter
Lint your JSON files!
Features
- Check if keys are sorted alphabetically...
- Check if your keys are either in camelCase, snake_case or kebab-case...
- ...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
# Lint multiple files...
$ json-linter a.json b.json
# Lint all files in a directory
$ json-linter files
# Lint all files in a directory recursively
$ json-linter files --recursive
# Lint all files in a directory recursively with .config and .cfg ending
$ json-linter files -r --extensions cfg config
# Fix files (will overwrite the file with a fixed version and then lint)
$ json-linter my-file.json --fix
# Overwrite configuration values
$ json-linter my-file.json --config-set naming_style=KEBAB_CASE indent=2
# Return results as json
$ json-linter my-file.json --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.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fd3723df60dfe9acfa3603736b7feee6ff279a220b2fe8aafea5006b1c6b672 |
|
MD5 | f8bb8ba596f5cdb71adafcedd77b266e |
|
BLAKE2b-256 | 11be0dd9069dde708b1506912bcb25f3abc54f7432830b5d8acdb7a36f085a00 |