skillfed

jsonslicer

Stream JSON parser with iterator interface

jsonslicer v0.1.8 315.4K downloads/30d#7,685 on PyPI49
Permissive license MIT Abandoned released

What it is and what it does

JsonSlicer is a streaming JSON parser that reads JSON incrementally from a file or stream without loading the entire document into memory. It uses the YAJL C library for performance and provides a Python iterator interface. You specify a path pattern (using tuples of keys, array indices, or None as wildcards) and the parser yields matching objects as complete Python objects.

The package is designed for processing very large JSON files or continuous streams where memory efficiency matters. It supports multiple path modes to return just the objects, map keys alongside objects, or full path information. It has no runtime dependencies beyond the compiled C extension, making it lightweight once installed.

Use it for:

  • Extract specific fields from multi-gigabyte JSON files without loading them into RAM
  • Process streaming JSON APIs or log files line-by-line or chunk-by-chunk
  • Iterate over all items in a deeply nested array or map using wildcard paths
  • Parse JSON with optional features like comments or trailing garbage via YAJL flags
  • Recover map keys alongside values when iterating dictionaries in JSON

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses JSON streams and large files without loading them entirely into memory, using a path-based iterator interface to extract specific nested objects.

Yes, if you need to parse large JSON files or streams and your system has YAJL development headers available. The memory efficiency and speed justify the compilation overhead for that use case. No if you work with small JSON documents, prefer pure-Python solutions, or cannot manage C extension builds—the project is abandoned and may have compatibility issues on newer systems.

Install

jsonslicer on PyPI

pip

pip install jsonslicer

uv

uv add jsonslicer

poetry

poetry add jsonslicer

Installing jsonslicer

Before you install

High install friction: the package is written in C and depends on the YAJL library, requiring compilation. The project is abandoned (last commit 2022-10-25, 1389 days ago), so build issues on newer systems may not be addressed.

License in practice

MIT license is permissive and poses no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

from jsonslicer import JsonSlicer

with open('data.json') as f:
    for item in JsonSlicer(f, ('key', None)):
        print(item)

Requires YAJL development library and a C compiler to build the extension module during installation.

Verify before relying

  • Whether YAJL development headers are available on target systems without manual installation
  • Compatibility with Python versions beyond 3.11 (classifiers list 3.6–3.11 only)
  • Current build status on modern compilers and operating systems given the project's abandonment

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 1,389 days since the last release
Last repo commit
First released
Downloads 315,445/month — #7,685 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jsonslicer-0.1.8.tar.gz

Keywords: json, parser, pull, stream

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: C++Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

stream json parserlarge json file parsingmemory-efficient jsonjson iteratorpull-based json parsingjson path extractionincremental json reader
streaming-parserc-extensionmemory-efficient

More Text Processing packages