Skip to main content
Module

x/enzastdlib/vendor/@deno-std-json.ts>ConcatenatedJsonParseStream

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
class ConcatenatedJsonParseStream
implements TransformStream<string, JsonValue>
import { ConcatenatedJsonParseStream } from "https://deno.land/x/enzastdlib@v0.0.4/vendor/@deno-std-json.ts";

Stream to parse Concatenated JSON.

Examples

Example 1

import { ConcatenatedJsonParseStream } from "https://deno.land/std@0.224.0/json/concatenated_json_parse_stream.ts";

const url = "https://deno.land/std@0.224.0/json/testdata/test.concatenated-json";
const { body } = await fetch(url);

const readable = body!
  .pipeThrough(new TextDecoderStream()) // convert Uint8Array to string
  .pipeThrough(new ConcatenatedJsonParseStream()); // parse Concatenated JSON

for await (const data of readable) {
  console.log(data);
}

Constructors

new
ConcatenatedJsonParseStream(unnamed 0?: ParseStreamOptions)

Properties

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