json-write

A stream-based serializer for JSON.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
json-write
3611.0.08 years ago11 years agoMinified + gzip package size for json-write in KB

Readme

json-write
This module implements a stream-based JSON serializer. Whereas JSON.stringify tends to run out memory, this serializer can handle very large objects without creating massive strings in memory.
var jsonWrite = require("json-write");

var writer = jsonWrite();
writer.pipe(process.stdout);
writer.write({type: "Topology", objects: [1,2]});
writer.end({type: "Topology", objects: [1,2]});

Each object you writer.write is separated by a new line.