/create-json-stream

Streaming big json files

Primary LanguageJavaScript

create-json-stream npm

Wrapper around indutny/json-depth-stream for easier access to emitted JSON items. Not so low-level / no need to read data by offsets.

Example

import { createJsonStream } from "create-json-stream";

// Stream emits geojson features 1 by 1
const stream = createJsonStream(
    "food-dominance.geojson",
    {
        path: ["features"],
        depth: 2
    },
    { encoding: null }
);