在 Linux 中, 可以使用 jq 命令将输出转换为 JSON 格式。 假设你有一个名为 input.txt 的文件, 其中包含如下内容: key1: value1 key2: value2 key3: value3