import { ConcatenatedJSONParseStream } from "https://deno.land/x/jsonlines@v1.2.2/mod.ts";
stream to parse Concatenated JSON.
import { ConcatenatedJSONParseStream } from "https://deno.land/x/jsonlines@v1.2.1/mod.ts";
const url = new URL("./testdata/concat-json.concat-json", import.meta.url);
const { body } = await fetch(`${url}`);
const readable = body!
.pipeThrough(new TextDecoderStream())
.pipeThrough(new ConcatenatedJSONParseStream());
for await (const data of readable) {
console.log(data);
}
Constructors
new
ConcatenatedJSONParseStream(options?: ParseStreamOptions)Properties
readonly
readable: ReadableStream<JSONValue>readonly
writable: WritableStream<string>