collect-json

WebJar for collect-json

License

License

MIT
Categories

Categories

JSON Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

collect-json
Last Version

Last Version

1.0.8
Release Date

Release Date

Type

Type

jar
Description

Description

collect-json
WebJar for collect-json
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/75lb/collect-json

Download collect-json

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/collect-json/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>collect-json</artifactId>
    <version>1.0.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/collect-json/
implementation 'org.webjars.npm:collect-json:1.0.8'
// https://jarcasting.com/artifacts/org.webjars.npm/collect-json/
implementation ("org.webjars.npm:collect-json:1.0.8")
'org.webjars.npm:collect-json:jar:1.0.8'
<dependency org="org.webjars.npm" name="collect-json" rev="1.0.8">
  <artifact name="collect-json" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='collect-json', version='1.0.8')
)
libraryDependencies += "org.webjars.npm" % "collect-json" % "1.0.8"
[org.webjars.npm/collect-json "1.0.8"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : collect-all jar [1.0.2,2)
org.webjars.npm : stream-connect jar [1.0.2,2)
org.webjars.npm : stream-via jar [1.0.3,2)

Project Modules

There are no modules declared in this project.

view on npm npm module downloads Build Status Dependency Status js-standard-style

collect-json

Returns a stream which becomes readable with a single value once all (valid) JSON is received.

collectJson([callback]) ⇒ Duplex

Kind: Exported function

Param Type Description
[callback] function called with the collected json data, once available. The value returned by the callback will be passed downstream.

Example
An example command-line client script - JSON received at stdin is stamped with received then written to stdout.

var collectJson = require("collect-json")

process.stdin
    .pipe(collectJson(function(json){
        json.received = true
        return JSON.stringify(json)
    }))
    .on("error", function(err){
        // input from stdin failed to parse
    })
    .pipe(process.stdout)

© 2015-16 Lloyd Brookes <[email protected]>. Documented by jsdoc-to-markdown.

Versions

Version
1.0.8