Using jq to format JSON on the clipboard
Summary
A practical blog post demonstrating how to use jq to pretty-print JSON that’s on the clipboard across macOS and Linux, with a tweak to handle non-JSON input gracefully. It includes code snippets for macOS (pbpaste | jq '.' | pbcopy) and Linux (xclip -selection clipboard -o | jq '.' | xclip -selection clipboard), discusses error handling, and links to related JSON/terminal topics.