Hacker News new | past | comments | ask | show | jobs | submit
At my job I have to work with a lot of JSON that's usually minimized. This command has single-handedly saved my sanity:

$ pbpaste | jq | pbcopy

Then I can paste it into whatever text editor I want and it's all nice & pretty-printed for me.

Bonus is that I don't have to change the command at all, just copy the minimized JSON to the clipboard (say from DBeaver, for example), then hit the 'up' arrow and enter.

I never knew that jq without any arguments pretty-printed JSON. Very useful, and great tip to combine with pbcopy/pbpaste.