json-lint
A fast Rust JSON linter and fixer, inspired by json-linter. It is distributed as a prebuilt binary on PyPI, the same way as ruff.
pip install fast-json-lint
json-lint my-file.json some-dir/
For every file (or every *.json file in a given directory) it:
- sorts object keys recursively in natural order (
a2beforea10) - rewrites the file with 2-space indentation and a trailing newline
- reports files that are not valid JSON and leaves them unchanged
It exits with status 1 if any file fails.
pre-commit
repos:
- repo: https://github.com/Kanzey/json-lint
rev: v0.1.2
hooks:
- id: json-lint
# files: ^config/ # optionally limit which JSON files are touched
The hook runs on all *.json files. pre-commit builds it with cargo the first time
and caches it, installing a Rust toolchain if one is missing. Because the hook rewrites
files, the first run fails if anything changed: review the changes, git add them, and
commit again.
Metadata
Release files for fast-json-lint 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fast_json_lint-0.1.2.tar.gz | 7.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fast_json_lint-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| fast_json_lint-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| fast_json_lint-0.1.2-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| fast_json_lint-0.1.2-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 868.7 kB
Release files / fast_json_lint-0.1.2.tar.gz
| Download URL | fast_json_lint-0.1.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0957a50a5f77571ebfe3cea1ad443f6e14f0faef913419c1f8f9e2d60654140a
|
|
BLAKE2b-256 checksum How to use checksums |
363bf7fbe72655561b44f2f14f32c5e7312c24aa557f501c70aa1dde81a7d38a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fast_json_lint-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fast_json_lint-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 224.3 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7e26fba7c3ce485bba6520a9166c01665258f30841845fc1228d0c3c4cffc048
|
|
BLAKE2b-256 checksum How to use checksums |
3b72e3614f434d397c1f591e4108c80b5953bf7a639ba8ad53937b1c0928268e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fast_json_lint-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fast_json_lint-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 212.0 kB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
441c1fcca9147e0f7578336621e4360398ecaa5744ed78069e0b0239be1d485e
|
|
BLAKE2b-256 checksum How to use checksums |
53f078c0cb2a661004c7820ecbac20ba6aefae077715c51a79df5211f32247d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fast_json_lint-0.1.2-py3-none-macosx_11_0_arm64.whl
| Download URL | fast_json_lint-0.1.2-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 205.2 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f6d8bc037ce40c004e03ddd3c8841a1cced1427f61fbd06002bc429753700cdd
|
|
BLAKE2b-256 checksum How to use checksums |
adba42df131bb633961082989b75d0699b4843be00e354419e9504d8b7d42149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fast_json_lint-0.1.2-py3-none-macosx_10_12_x86_64.whl
| Download URL | fast_json_lint-0.1.2-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 220.0 kB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c9b7b20fdcb23f4c6df3f2d3d94025e812fbc1182715217a16a88682c866a4f
|
|
BLAKE2b-256 checksum How to use checksums |
881ff6f4185bced7c9d7011424303652d96d248e9cae6e1ae1154e2aa9ac0460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|