How to use the stream-json.parser function in stream-json

To help you get started, we’ve selected a few stream-json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github embark-framework / embark / packages / embark-proxy / src / old_proxy.js View on Github external
const server = http.createServer((req, res) => {
      if (req.method === 'POST') {
        // messages TO the target
        Asm.connectTo(
          pump(req, jsonParser())
        ).on('done', ({current: object}) => {
          this.trackRequest({ ws: false, data: object});
        });
      }

      if (!ws) {
        proxy.web(req, res);
      }
    });
github embark-framework / embark / packages / embark-blockchain-process / src / proxy.js View on Github external
const server = http.createServer((req, res) => {
      if (req.method === 'POST') {
        // messages TO the target
        Asm.connectTo(
          pump(req, jsonParser())
        ).on('done', ({current: object}) => {
          this.trackRequest({ ws: false, data: object});
        });
      }

      if (!ws) {
        proxy.web(req, res);
      }
    });
github embark-framework / embark / src / lib / modules / blockchain_process / proxy.js View on Github external
const server = http.createServer((req, res) => {
      if (req.method === 'POST') {
        // messages TO the target
        Asm.connectTo(
          pump(req, jsonParser())
        ).on('done', ({current: object}) => {
          this.trackRequest(object);
        });
      }

      if (!ws) {
        proxy.web(req, res);
      }
    });

stream-json

stream-json is the micro-library of Node.js stream components for creating custom JSON processing pipelines with a minimal memory footprint. It can parse JSON files far exceeding available memory streaming individual primitives using a SAX-inspired API. I

BSD-3-Clause
Latest version published 13 days ago

Package Health Score

80 / 100
Full package analysis