4 ms·
Or cat foo.json | python3 -m json.tool Prettifying is also built in to python3 on any system.
by tonyhb 7y ago
Or
cat foo.json | python3 -m json.tool
Prettifying is also built in to python3 on any system.
- pstuart 7y agoOr jq . foo.json
- vesinisa 7y agojq is freaking awesome! It can do amazing stuff, it's like awk for JSON on steroids. Highly recommend reading the documentation: https://stedolan.github.io/jq/manual/ https://stedolan.github.io/jq/manual/
- fs111 7y agouseless use of cat: python3 -m json.tool foo.json
- dheera 7y agoUsually though what happens is this: :) cat foo.json [oh crap] :) cat foo.json | python -m foo.tool For the 2nd command I'd hit "[up] | pyth[tab] -m json.tool"