Skip to content
curl with pretty JSON outputs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore updated project desc Jul 23, 2018
Makefile sort json keys Dec 20, 2018
README.md updated readme 2 Jul 23, 2018
curljson.py fix output issue Apr 18, 2019
setup.py

README.md

curljson

curl with pretty JSON outputs.

Install

$ pip install curljson

Usages

Use as curl:

$ curljson -i https://httpbin.org/get

HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.8.1
Date: Mon, 23 Jul 2018 22:46:53 GMT
Content-Type: application/json
Content-Length: 166
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Via: 1.1 vegur

{
    "headers": {
        "Accept": "*/*",
        "Host": "httpbin.org",
        "User-Agent": "curl/7.43.0",
        "Connection": "close"
    },
    "origin": "12.13.7.19",
    "args": {},
    "url": "https://httpbin.org/get"
}

Use as python2 -m json.tool:

$ echo '{"bin": "curl", "lang": "Python"}' | curljson
{
    "lang": "Python",
    "bin": "curl"
}
You can’t perform that action at this time.