Skip to main content

@std/json@1.0.1
Built and signed on GitHub Actions

(Streaming) parsing and serializing of JSON files

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
4 months ago (1.0.1)

Utilities for parsing streaming JSON data.

import { JsonStringifyStream } from "@std/json";
import { assertEquals } from "@std/assert";

const stream = ReadableStream.from([{ foo: "bar" }, { baz: 100 }])
  .pipeThrough(new JsonStringifyStream());

assertEquals(await Array.fromAsync(stream), [
  `{"foo":"bar"}\n`,
  `{"baz":100}\n`
]);
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@std/json

Import symbol

import * as json from "@std/json";

---- OR ----

Import directly with a jsr specifier

import * as json from "jsr:@std/json";

Add Package

npx jsr add @std/json

Import symbol

import * as json from "@std/json";

Add Package

yarn dlx jsr add @std/json

Import symbol

import * as json from "@std/json";

Add Package

pnpm dlx jsr add @std/json

Import symbol

import * as json from "@std/json";

Add Package

bunx jsr add @std/json

Import symbol

import * as json from "@std/json";