Skip to content

Instantly share code, notes, and snippets.

@nstielau
Created February 25, 2014 21:35
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
A one-liner for validating json
# 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