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

# ConvertDictionaryToString - ComfyUI Built-in Node Documentation

> Complete documentation for the ConvertDictionaryToString node in ComfyUI. Learn its inputs, outputs, parameters and usage.

此节点将字典（键值对集合）转换为文本字符串，通常采用 JSON 格式。您可以控制缩进级别，使输出更易读或更紧凑。

## 输入

| 参数   | 描述                           | 数据类型 | 是否必填 | 取值范围  |
| ---- | ---------------------------- | ---- | ---- | ----- |
| `字典` | 要转换为字符串的字典                   | DICT | 是    | -     |
| `缩进` | 每级缩进的空格数。0 生成紧凑的单行字符串（默认值：2） | INT  | 否    | 0 到 8 |

## 输出

| 输出名称     | 描述                | 数据类型   |
| -------- | ----------------- | ------ |
| `STRING` | 转换为 JSON 格式字符串的字典 | STRING |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ConvertDictionaryToString/zh.md)

***

**Source fingerprint (SHA-256):** `ae4e9889d5347acfc69166bac66f2ba63f5cd37dafab25a9e0aff6bfe7381219`
