npm.io
1.0.0 • Published 10 years ago

json-write

Licence
BSD-3-Clause
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
36

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.

Keywords