Pull a few specific fields out of a multi-gigabyte JSON file without running out of memory.
Process JSON data as it streams in from a network request or file, chunk by chunk.
Scan deeply nested JSON to find every value matching a given key or path.
Run JSON extraction on memory-constrained environments like edge workers.
| bielok/jpath | 0xradioac7iv/tempfs | 7vignesh/pgpulse | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 3/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Experimental library, install size under 300 KiB, but the chained path API takes some reading to learn.
jpath is a library for reading through JSON data piece by piece instead of loading the whole file into memory at once. It is built for cases where a JSON file is huge, even a gigabyte or more, and you only need to pull out a few specific values from deep inside it. Rather than parsing the entire document into objects and arrays first, jpath scans the raw bytes as they arrive and grabs only the parts that match a path you define. The project is written in TypeScript and works in plain JavaScript too. It ships as CommonJS, ESM, and a browser-ready UMD build, so it fits into most kinds of projects without extra setup. You install it with npm and create a parser instance, then chain methods like key and index to describe where in the document the value you want lives, similar to how you would write a JSONPath expression such as store.books[0].authors[0]. There is also a wildcard method for matching any key or index, and methods for moving to the next sibling or the next matching value at any depth, which is useful for scanning through lists or finding every occurrence of a field anywhere in the document. Because it avoids creating intermediate objects while parsing, memory use stays small and predictable, even on very large inputs, and the author reports it running on edge workers with well under 128 megabytes of RAM. Feeding it data in chunks means you do not need the full file on disk or in memory before you start reading results. The library also quietly skips over JSON comments, so it can handle JSONC-style files that include line and block comments without extra configuration. The README describes the project as new and experimental, noting that performance could still improve by roughly double. It has no runtime dependencies, a small install size, and reports over 90 percent test coverage along with fuzz and concurrency testing. It is aimed at developers who need to pull specific values out of very large or streaming JSON data efficiently, rather than at general everyday JSON parsing tasks.
A streaming JSON parser that extracts specific values from huge JSON files without loading the whole file into memory.
Mainly TypeScript. The stack also includes TypeScript, JavaScript, Node.js.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.