Last active
November 16, 2023 21:59
-
-
Save levigroker/83fbb569f1c3bb9e445d83b25293aac5 to your computer and use it in GitHub Desktop.
BBEdit Text Filter to format JSON compactly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# JSON Compact - BBEdit Text Filter to format JSON compactly | |
# https://gist.github.com/levigroker/83fbb569f1c3bb9e445d83b25293aac5 | |
# 2023-11-16 | |
JQ_E="jq" | |
which "$JQ_E" >/dev/null 2>&1 | |
[ $? == 0 ] || { echo "ERROR: Please ensure '$JQ_E' is installed. 'brew install $JQ_E' (see https://jqlang.github.io/jq/ )" >&2; exit 1; } | |
$JQ_E -c . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment