Skip to content

Instantly share code, notes, and snippets.

@kamiller
Created July 25, 2012 19:09
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save kamiller/3177943 to your computer and use it in GitHub Desktop.
Save kamiller/3177943 to your computer and use it in GitHub Desktop.
validate json with python via bash script
echo '{"foo":"bar"}' | python -m json.tool >> /dev/null && exit 0 || echo "NOT valid JSON"; exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment