Socket
Book a DemoInstallSign in
Socket

stream-to-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-to-json

Deserialize JSON from a stream

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

stream

FAQs

Package last updated on 01 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts