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 🙏

© 2025 – Pkg Stats / Ryan Hefner

json-streaming-parser

v1.0.4

Published

A streaming JSON parser for efficient parsing of large JSON objects, with the ability to emit partial objects as they are parsed. Contributed by [www.hubeet.com](https://www.hubeet.com)

Readme

🚀 JSON Streaming Parser

npm version Downloads License PRs Welcome

A high-performance streaming JSON parser that handles JSON like a pro! Perfect for parsing large JSON objects efficiently, with real-time partial object emission. Built with robustness in mind, it can handle malformed JSON like a champ - whether it's missing commas, wrong formatting, or even JSON written by a very enthusiastic monkey! 🐒

✨ Features

  • 🌊 Stream processing of large JSON data
  • 🛠️ Fault-tolerant parsing of malformed JSON
  • 🏃‍♂️ Real-time partial object updates
  • 💪 Robust error handling
  • 🎯 Zero dependencies
  • 📦 Lightweight (~5KB minified)
  • 🔒 Type-safe with TypeScript definitions
  • 🚦 Event-based architecture

🔧 Installation

npm install json-streaming-parser
# or
yarn add json-streaming-parser
# or
pnpm add json-streaming-parser

📚 Usage

Online HTML Demo

Online HTML Demo

Basic Example

import { JSONStreamingParser } from 'json-streaming-parser';

try {
  const parser = new JSONStreamingParser();
  
  parser.on('updateObject', (partialObject) => {
    console.log('Got partial data:', partialObject);
  });

  // Feed data chunks as they arrive
  parser.write('{"name": "John", ');
  parser.write('"age": 30, ');
  parser.write('"city": "New York"}');
  parser.end();
} catch (error) {
  console.error('Parser error:', error);
}

🔍 Advanced Features

Event System

  • updateObject: Emitted when partial objects are parsed
  • error: Handling parsing errors
  • end: Stream completion
  • timeout: Parser timeout events
  • progress: Parsing progress updates

🎯 Performance

Benchmarks run on Node.js 18.x, processing 1GB JSON file:

| Parser | Memory Usage | Processing Time | |------------------------|--------------|-----------------| | JSON Streaming Parser | ~50MB | 2.3s | | JSON.parse() | ~1.2GB | 4.1s | | Other Streaming Parser | ~120MB | 3.5s |

🤝 Contributing

We love contributions! Here's how you can help:

  1. 🐛 Report bugs
  2. 💡 Suggest features
  3. 📝 Improve documentation
  4. 🔧 Submit PRs

Check our Contributing Guide for details.

📄 License

This project is licensed under the MIT License.

🏢 About Hubeet

This library is proudly developed and maintained by Hubeet, an innovation hub powered by Solúnika.

At Solúnika, we specialize in:

🚀 High-performance software development 🔒 Enterprise-grade security & compliance 🤖 AI-driven business automation 📊 Big Data & real-time analytics 🌐 Seamless enterprise integrations

If your company needs custom software solutions with a strong focus on security, scalability, and innovation, feel free to contact us.

🌟 Star Us!

If you find this library helpful, please give it a star! It helps others discover this solution.