Api 获取请求-格式化JSON文件

Api 获取请求-格式化JSON文件,api,curl,get,Api,Curl,Get,我想从批处理文件启动一个curl请求。结果是一个未格式化的数据文件 call curl --request GET --url "http:*****" --header "Accept: */*" --header "Accept-Encoding: gzip, deflate" --header "Authorization:****" --header "Cache-Control: no-cache" --header "Connection: keep-alive" --heade

我想从批处理文件启动一个curl请求。结果是一个未格式化的数据文件

call curl --request GET  --url "http:*****" --header "Accept: */*"
--header "Accept-Encoding: gzip, deflate" --header "Authorization:****"  --header "Cache-Control: no-cache" --header "Connection: keep-alive" --header "Content-Type: application/json" >****.json
任何人都知道获取格式json数据文件的解决方案

提前谢谢

我可以问一个问题吗, 您用于curl请求的操作系统是什么

根据操作系统的不同,有许多方法可以重新格式化json响应

如果是Ubuntu,您可以安装“json_reformat”库并在curl命令中使用

i、 e。
curl..url…|json_重新格式化