Skip to main content

Convert a ReadableStream to JSON

还没翻译译自英文(bun.com)本页 3 段都还没译

Bun provides several conveniences for reading the contents of a ReadableStream into other formats. To read a stream and parse it as JSON, call its json() method.

const stream = new ReadableStream();
const json = await stream.json();

See Bun's other ReadableStream conversion functions.

翻訳 © 2026 fanyi.dev · 原文 © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)