For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /nodes/09/ConvertDictionaryToString.md.

字典转字符串(ConvertDictionaryToString)

ConvertDictionaryToStringtext角色:文本工具

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

参数

参数类型默认 / 范围说明
dictionaryDICT—(连线输入)—
indentINT0 ~ 8—

输出

输出类型说明
STRINGSTRING文本

怎么接

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

使用案例

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

端口与连线示意

ConvertDictionaryToString 端口与连线示意

同类节点

保存文本 · 文本前添加 · 文本后添加 · 构建 JSON 提示(Ideogram) · 大小写转换器 · 数组转字符串 · 从JSON提取字符串 · 融合文本序列 · 正则表达式提取 · 正则表达式匹配 · 正则表达式替换 · 替换文本