JSONL Lens
JSONL Lens is a small, dependency-free command-line tool for validating and inspecting JSON Lines files. It streams input one line at a time, so it is useful for logs, model datasets, exports, and other files that should not be loaded fully into memory.
Features
- Reports malformed JSON with line and column numbers.
- Counts valid records, blank lines, top-level JSON types, and common object fields.
- Emits human-readable text or JSON for automation.
- Streams
.jsonl.gzfiles directly without manual decompression. - Reads a file or standard input.
- Uses only the Python standard library at runtime.
Install
Install the latest published release:
python -m pip install jsonl-lens
For development from a checkout:
git clone https://github.com/BlueArt333/jsonl-lens.git
cd jsonl-lens
python -m pip install -e ".[dev]"
Usage
jsonl-lens events.jsonl
jsonl-lens archived-events.jsonl.gz
jsonl-lens events.jsonl --format json
jsonl-lens events.jsonl --require-field id --require-field timestamp
Get-Content events.jsonl | jsonl-lens
Use repeatable --require-field options to check that every object record contains the
fields your pipeline expects. Non-object records are reported when this validation is enabled.
Exit status is 0 when every nonblank line is valid JSON, 1 when malformed lines are
found, and 2 for file or encoding errors.
Contributing
Issues and focused pull requests are welcome. Run the checks locally with:
python -m pytest
python -m ruff check .
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsonl_lens-0.1.0.tar.gz.
File metadata
- Download URL: jsonl_lens-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
493134be8ba5a022931ded9c537a9bf2a04aa3f323a4df39256be643f667e128
|
|
| MD5 |
6f222013776c4a1f40a7a0108cb7c4bc
|
|
| BLAKE2b-256 |
5d9be381396b3e71aef076de2e935673ae6e17978c237749e58e93167ab0945f
|
Provenance
The following attestation bundles were made for jsonl_lens-0.1.0.tar.gz:
Publisher:
publish.yml on BlueArt333/jsonl-lens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonl_lens-0.1.0.tar.gz -
Subject digest:
493134be8ba5a022931ded9c537a9bf2a04aa3f323a4df39256be643f667e128 - Sigstore transparency entry: 2455446642
- Sigstore integration time:
-
Permalink:
BlueArt333/jsonl-lens@310c3b4201d1918910b1f2b4f8a8aee3b4e9837d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BlueArt333
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@310c3b4201d1918910b1f2b4f8a8aee3b4e9837d -
Trigger Event:
release
-
Statement type:
File details
Details for the file jsonl_lens-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jsonl_lens-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d33f7e8a1944d90466fe94c26dbbb69293c10ee26355979c036f585cf4d53da
|
|
| MD5 |
60a7d2a495c524551ddd39bd0d4f19d6
|
|
| BLAKE2b-256 |
834bb0c8b163f4bfd94e5539d945a8adca0bd4ab0b19f6ea5f99d646b9239c48
|
Provenance
The following attestation bundles were made for jsonl_lens-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on BlueArt333/jsonl-lens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonl_lens-0.1.0-py3-none-any.whl -
Subject digest:
0d33f7e8a1944d90466fe94c26dbbb69293c10ee26355979c036f585cf4d53da - Sigstore transparency entry: 2455446763
- Sigstore integration time:
-
Permalink:
BlueArt333/jsonl-lens@310c3b4201d1918910b1f2b4f8a8aee3b4e9837d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BlueArt333
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@310c3b4201d1918910b1f2b4f8a8aee3b4e9837d -
Trigger Event:
release
-
Statement type: