| |
The author describes using jq, a JSON formatting tool, with a clipboard utility to quickly prettify JSON data. They provide practical aliases for both macOS (using pbpaste/pbcopy) and Linux (using xclip), and add error handling to preserve non-JSON clipboard content if the formatting fails. The final solution allows users to format JSON on their clipboard without accidentally losing data when the input isn't valid JSON.
Read Full Article →
← More Tech news