Metadata-Version: 2.1
Name: json-linter
Version: 1.0.1
Summary: Lint your JSON files!
Home-page: https://github.com/atomicptr/json-linter
Author: Christopher Kaster
Author-email: me@atomicptr.de
License: UNKNOWN
Platform: UNKNOWN
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# 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.

```bash
$ pip install json-linter
```

## Usage

```bash
# 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

![](https://www.gnu.org/graphics/gplv3-127x51.png)


