CURL pretty JSON and extracting JSON value

Pretty JSON


curl -s https://api.github.com/users/haijunsu | python -m json.tool

Extracting JSON value


curl -s https://api.github.com/users/haijunsu | python -c "import sys,json; print(json.load(sys.stdin)['name'])"

Written on August 4, 2022