npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jumbo-json

v0.2.0

Published

For when you have a Boeing 747 worth of JSON you want in memory

Downloads

320

Readme

jumbo-json

Do you ever find yourself needing to load in some JSON which is just plain too big? Then you try using a streaming parser and it becomes a headache trying to find the pieces you need and stitch them together?

Try 🎉jumbo-json🎉! The only* JSON library that will load in arbitrarily** large JSON files entirely in to memory for you to use without any headache.

When should I use this?

V8's string size cap (~512 MB) means JSON.parse throws a RangeError on large inputs before it even starts parsing. jumbo-json reads straight from bytes so that limit doesn't apply.

Below that threshold, JSON.parse is roughly 6–10× faster than jumbo-json because it runs native C++ code rather than a JS tokenizer. jumbo-json handles this automatically — when the input size is known and small enough, it falls back to JSON.parse for you.

Usage

jumbo-json exposes two methods:

  • JumboJSON.parse: synchronous, accepts a string, Uint8Array, or Iterable<Uint8Array>
  • JumboJSON.parseAsync: asynchronous, accepts a ReadableStream<Uint8Array> or Blob

Passing a Blob to parseAsync is preferred over a stream because its size is known ahead of time.

Parse from a file (Node.js, zero-copy)

Use openAsBlob with parseAsync:

import { JumboJSON } from 'jumbo-json';
import { openAsBlob } from 'node:fs';

const blob = await openAsBlob('/path/to/huge.json');
const data = await JumboJSON.parseAsync(blob);

Or use readFileSync with the synchronous parse:

import { JumboJSON } from 'jumbo-json';
import { readFileSync } from 'node:fs';

const bytes = readFileSync('/path/to/huge.json');
const data = JumboJSON.parse(bytes);

Parse from a fetch response (browser / edge)

import { JumboJSON } from 'jumbo-json';

const response = await fetch('/path/to/data.json');
const data = await JumboJSON.parseAsync(response.body);

Automatic fallback to JSON.parse

When the input size is at or below streamingThreshold (default: 512 MB), jumbo-json buffers the input and delegates to JSON.parse automatically — so you can use a single code path regardless of payload size.

If you know the size ahead of time but can't create a Blob, pass a sizeHint:

import { JumboJSON } from 'jumbo-json';
import { open, stat } from 'node:fs/promises';

const { size } = await stat('/path/to/data.json');
const handle = await open('/path/to/data.json');
try {
  const data = await JumboJSON.parseAsync(handle.readableWebStream(), {
    sizeHint: size,
  });
} finally {
  await handle.close();
}

Override streamingThreshold to change the cutoff:

// Always use the native parser (never stream)
const data = await JumboJSON.parseAsync(stream, {
  sizeHint: payloadBytes,
  streamingThreshold: Infinity,
});

The same sizeHint and streamingThreshold options work with the synchronous parse when passing an Iterable<Uint8Array>:

const data = JumboJSON.parse(iterableOfChunks, {
  sizeHint: totalBytes,
  streamingThreshold: Infinity,
});

Parse from a stream

import { JumboJSON } from 'jumbo-json';

const stream = new ReadableStream({
  /* ... */
});
const data = await JumboJSON.parseAsync(stream);

* - there's probably others out there

** - within reason. I didn't invent infinite memory