0.0.8 • Published 6 years ago

fast-json-stream-parser v0.0.8

Weekly downloads
7
License
MIT
Repository
gitlab
Last release
6 years ago

fast-json-stream-parser

npm.io

!! This is early beta, do not use in production !!

JSON parser that works with huge arrays and performs fast.

As a motivation to build this package was speed of JSONStream package. This package does parsing atleast twice as fast.

Current version is so naive that it scans objects on first level. I.e. it finds two objects in this json string [{},{}] while it finds single object in this string {"a":[{}, {}, {}]}. For more information see tests.

install

npm install fast-json-stream-parser

example

const ParserStream = require('fast-json-stream-parser').default

const ps = new ParserStream()

ps.on('data', object => {
  console.log(object.id)
})

ps.on('end', () => {
  console.log('finished')
})

ps.write('{"a": 1, "b": [{"id": 1}, {"id": 2}]}')
ps.end()
0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago