> ## Documentation Index
> Fetch the complete documentation index at: https://bun.ll1025.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 将 ReadableStream 转换为 JSON

Bun 提供了多种便捷方式将 [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) 的内容读取为其他格式。要读取流并将其解析为 JSON，请调用其 `json()` 方法。

```ts theme={null}
const stream = new ReadableStream();
const json = await stream.json();
```

***

参见 [Bun 的其他 `ReadableStream` 转换函数](/runtime/utils#bun-readablestreamto)。
