async-json-writer

v1.0.2
Writes huge JSONs to stream with minimum memory usage
JSON stream

async-json-writer

Install

npm install async-json-writer

Use

'use strict';

const asyncJsonWriter = require('async-json-writer');
const fs = require('fs');

const hugeObject = {};
const out = fs.createWriteStream('out.json');

asyncJsonWriter(out, hugeObject, function(err) {
  if (err) {
    console.error('Error', err);
    return;
  }
  console.log('Done');
});

Metadata

  • ISC
  • Whatever
  • Roman Grudzinski
  • released 3/9/2016

Downloads

Maintainers