stream-to-json

0.0.1 • Public • Published

stream-to-json

Deserialize JSON from a stream

build status

testling badge

Example

var toJSON = require('stream-to-json');
var request = require('request');
 
toJSON(request('/some/url.json'), function(err, json) {
  if (err) throw err;
  console.log(json);
});

API

toJSON(stream, fn)

Read all from stream, then JSON.parse and call fn with the result. If there's an Error in the stream itself, or parsing the JSON, an error will be passed.

Installation

$ npm install stream-to-json

License

MIT

Keywords

none

install

npm i stream-to-json

Downloadsweekly downloads

28

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability