jq#

validate and pretty-print a file#

jq . input.json

get a property with raw output#

jq -r .propertyName input.json

minify#

jq -c . < input.json

compare file contents, regardless of structure:#

diff <(jq --sort-keys . a.json) <(jq --sort-keys . b.json)
diff <(jq -S . a.json) <(jq -S . b.json)

Resources#