readable stream containing json data
Optional
options: Partial<ReadJsonOptions>>>> const readStream = new Stream.Readable({read(){}});
>>> readStream.push(`${JSON.stringify({a: 1, b: 2})} \n`);
>>> readStream.push(`${JSON.stringify({a: 2, b: 2})} \n`);
>>> readStream.push(`${JSON.stringify({a: 3, b: 2})} \n`);
>>> readStream.push(`${JSON.stringify({a: 4, b: 2})} \n`);
>>> readStream.push(null);
>>> pl.readJSONStream(readStream, { format: "lines" }).then(df => console.log(df));
shape: (4, 2)
┌─────┬─────┐
│ a ┆ b │
│ --- ┆ --- │
│ i64 ┆ i64 │
╞═════╪═════╡
│ 1 ┆ 2 │
├╌╌╌╌╌┼╌╌╌╌╌┤
│ 2 ┆ 2 │
├╌╌╌╌╌┼╌╌╌╌╌┤
│ 3 ┆ 2 │
├╌╌╌╌╌┼╌╌╌╌╌┤
│ 4 ┆ 2 │
└─────┴─────┘
Read a newline delimited JSON stream into a DataFrame.