Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class ConcatenatedJsonParseStream
implements TransformStream<string, JsonValue>
import { ConcatenatedJsonParseStream } from "https://deno.land/std@0.155.0/encoding/json/_parse.ts";

stream to parse Concatenated JSON.

import { ConcatenatedJSONParseStream } from "https://deno.land/std@0.155.0/encoding/json/stream.ts";

const url = "https://deno.land/std@0.155.0/encoding/testdata/json/test.concatenated-json";
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(unnamed 0?: ParseStreamOptions)

Properties

readonly
readable: ReadableStream<JsonValue>
readonly
writable: WritableStream<string>