我有一个文本文件,我想将其变成带有引号和的单个 JSON 字符串 ,最好是从命令行。我不需要多个字符串或字典。
cat ./my-input-file | jq -R --slurp . > ./my-output.json