💾 Archived View for g.codelearn.me › 2018-03-23-format-curl-json.gmi captured on 2024-05-26 at 14:46:02. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Hey,
Sometimes I check HTTP responses with CURL so it would be great to format JSON responses.
There is cool command line JSON parser and you can pipe CURL output to it like that:
`curl http://some.endpoint/with-json-response | jq '.'`
I've wrote useful function called `jcurl` that is basically wrapper on that command above:
function jcurl() { curl "$@" | jq '.' }
P.S. Don't forget to source your `(bash|zsh|any)rc`.