Skip to main content

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.gz files 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

Metadata

Release files for jsonl-lens 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsonl-lens 0.1.0
File Size Uploaded Provenance Actions
jsonl_lens-0.1.0.tar.gz 5.6 kB With provenance Details for jsonl_lens-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jsonl-lens 0.1.0
File Interpreter ABI Platform Actions
jsonl_lens-0.1.0-py3-none-any.whl Python 3 none any Details for jsonl_lens-0.1.0-py3-none-any.whl

Total release size: 10.9 kB

Release files / jsonl_lens-0.1.0.tar.gz

Download URL jsonl_lens-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
493134be8ba5a022931ded9c537a9bf2a04aa3f323a4df39256be643f667e128
BLAKE2b-256 checksum
How to use checksums
5d9be381396b3e71aef076de2e935673ae6e17978c237749e58e93167ab0945f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / jsonl_lens-0.1.0-py3-none-any.whl

Download URL jsonl_lens-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d33f7e8a1944d90466fe94c26dbbb69293c10ee26355979c036f585cf4d53da
BLAKE2b-256 checksum
How to use checksums
834bb0c8b163f4bfd94e5539d945a8adca0bd4ab0b19f6ea5f99d646b9239c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Security for jsonl-lens 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jsonl_lens-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page