For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/node/config/functions/writeJson.md.
  • English
  • Function: writeJson()

    function writeJson(filePath: string, value: unknown): void;

    Defined in: node/config/index.ts:414

    原子写 JSON:写到临时文件再 rename,避免半写状态。 自动创建父目录。

    Parameters

    ParameterType
    filePathstring
    valueunknown

    Returns

    void