> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 字典转字符串（ConvertDictionaryToString）

<div class="node-meta"><code>ConvertDictionaryToString</code><span>text</span><span>角色：文本工具</span></div>

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

## 参数

| 参数           | 类型   | 默认 / 范围 | 说明 |
| ------------ | ---- | ------- | -- |
| `dictionary` | DICT | —（连线输入） | —  |
| `indent`     | INT  | 0 \~ 8  | —  |

## 输出

| 输出     | 类型     | 说明 |
| ------ | ------ | -- |
| STRING | STRING | 文本 |

## 怎么接

- **上游**：PrimitiveString / 上一级文本节点
- **下游**：CLIPTextEncode.text / SaveText / 其他文本节点
- **接线**：纯文本处理：上游接 PrimitiveString 或上一级文本节点，输出接 CLIPTextEncode 的 `text`、SaveText 或文件名参数，用来批量生成/改写提示词。

## 使用案例

从 `dictionary`、`indent`（2） 开始填就能跑起来。典型接法：`PrimitiveString` → 本节点 → `CLIPTextEncode.text`。输出类型是 STRING，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

![ConvertDictionaryToString 端口与连线示意](/svg/ConvertDictionaryToString.svg)

## 同类节点

[保存文本](/nodes/09/SaveText.md) · [文本前添加](/nodes/09/AddTextPrefix.md) · [文本后添加](/nodes/09/AddTextSuffix.md) · [构建 JSON 提示（Ideogram）](/nodes/09/BuildJsonPromptIdeogram.md) · [大小写转换器](/nodes/09/CaseConverter.md) · [数组转字符串](/nodes/09/ConvertArrayToString.md) · [从JSON提取字符串](/nodes/09/JsonExtractString.md) · [融合文本序列](/nodes/09/MergeTextLists.md) · [正则表达式提取](/nodes/09/RegexExtract.md) · [正则表达式匹配](/nodes/09/RegexMatch.md) · [正则表达式替换](/nodes/09/RegexReplace.md) · [替换文本](/nodes/09/ReplaceText.md)
