shell 中格式化显示 json 字符串

有时需要在终端环境中查看 json 数据,比如使用 curl 调试接口时。直接看到的 json 数据是类似这样的: $ echo '{"foo": "lorem", "bar": "ipsum"}' {"foo": "lorem", "bar": "ipsum"} 如果想要以更直观的方式格式化显示 json 数...

April 20, 2022 · 1 分钟 · 208 字 · Tianlun Song