Skip to main content

@std/json@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)
class ConcatenatedJsonParseStream

Stream to parse Concatenated JSON.

Examples

Example 1

import { ConcatenatedJsonParseStream } from "@std/json/concatenated_json_parse_stream";

const url = "@std/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)

Constructs a new instance.

Properties

A readable stream of byte data.

A writable stream of byte data.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/json

Import symbol

import { ConcatenatedJsonParseStream } from "@std/json";
or

Import directly with a jsr specifier

import { ConcatenatedJsonParseStream } from "jsr:@std/json";