Skip to content

Instantly share code, notes, and snippets.

@fxthomas
Created January 18, 2012 21:47
Show Gist options
  • Save fxthomas/1635947 to your computer and use it in GitHub Desktop.
Save fxthomas/1635947 to your computer and use it in GitHub Desktop.
JSON Validation Script for VIM with built-in Python module
#!/bin/bash
# Base Script File (jsonv.sh)
# Created: Fri Jan 13 15:26:18 2012
# Version: 1.0
# Author: François-Xavier Thomas <[email protected]>
#
# This Bash script was developped by François-Xavier Thomas.
# You are free to copy, adapt or modify it.
# If you do so, however, leave my name somewhere in the credits, I'd appreciate it ;)
if python -mjson.tool >/dev/null;
then
echo "Valid JSON!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment