Skip to content

tequila99/json-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-stream

New line-delimeted JSON parser with a stream interface.

(some minor improvements for this package: https://github.com/mmalecki/json-stream)

Installation

npm install @tequila99/json-stream

Usage

const JSONStream = require('@tequila99/json-stream');

const stream = JSONStream();

stream.on('data', function (chunk) {
  console.dir(chunk);
});
stream.write('{"a":');
stream.write('42}\n');
stream.write('{"hel');
stream.write('lo": "world"}\n');

Will output:

{ a: 42 }
{ hello: 'world' }

If invalid JSON gets written, it's silently ignored.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published