json-write

1.0.0 • Public • Published

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.

/json-write/

    Package Sidebar

    Install

    npm i json-write

    Weekly Downloads

    81

    Version

    1.0.0

    License

    BSD-3-Clause

    Last publish

    Collaborators

    • mbostock