Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

jsonl

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonl

Transform a stream of JSON into a stream of Line Delimited JSON

Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

jso\nl

Transform a stream of JSON into a stream of Line Delimited JSON

Install

$ npm install --save jsonl

Use

var jsonl = require("jsonl")
var request = require("request")
var zlib = require("zlib")

var jeopardyQuestions = "http://skeeto.s3.amazonaws.com/share/JEOPARDY_QUESTIONS1.json.gz"

request.get(jeopardyQuestions)
  .pipe(zlib.Gunzip())
  .pipe(jsonl())
  .pipe(process.stdout)

API

var jsonl = require("jsonl")([opts])

opts.depth

  • Type: Number (default: 1)

The depth of the objects in the incoming data to pluck out. This is what you want for an array of objects, such as:

[{"this":"that"},{"this":"that"}]

opts.objectMode

  • Type: Boolean (default: false)

Convert data into an object stream.

opts.separator

  • Type: String (default: \n)

String to separate object data with.

License

MIT © Stephen Sawchuk

Keywords

json

FAQs

Package last updated on 31 Oct 2014

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