Created
February 25, 2014 21:35
-
-
Save nstielau/9218374 to your computer and use it in GitHub Desktop.
A one-liner for validating json
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
# Lint JSON with python (the exit 255 stops xargs after the first failed command) | |
find . -name "*.json" -print | xargs -Ixx bash -c "echo JSON linting xx 1>&2; cat xx | python -mjson.tool > /dev/null || exit 255" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment