> ## 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.

# 将 Node.js Readable 转换为 JSON

要在 Bun 中将 Node.js `Readable` 流转换为 JSON 对象，请创建一个以该流为正文的 [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)，然后调用 [`response.json()`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json)。

```ts theme={null}
import { Readable } from "stream";
const stream = Readable.from([JSON.stringify({ hello: "world" })]);
const json = await new Response(stream).json();
console.log(json); // { hello: "world" }
```
