diff --git a/tools/validate-json.sh b/tools/validate-json.sh
index c4d1f392460f765e6c0ce7de33089ff89d3f703c..35338e8d958dfa5a8a2658c5bcfd58be46d17cf7 100755
--- a/tools/validate-json.sh
+++ b/tools/validate-json.sh
@@ -1,17 +1,32 @@
 #!/bin/bash
 set -e
-
-TMPFILE=$(mktemp)
 ret=0
 
+# For MacOSX users the freebsd's mktemp by default behave diferently,
+# installing the coreutils from brew would give you this but that would be
+# renamed to gmktemp to don't conflict with the stand mktemp, so let just use
+# that if available.
+if type -p gmktemp &>/dev/null; then
+    TMPFILE=$(gmktemp)
+else
+    TMPFILE=$(mktemp)
+fi
+
 function clean {
     rm -f ${TMPFILE}
 }
 trap clean EXIT
 
-for f in $(find docker/ -type f -name '*.json');do
-    jsonlint -s ${f} >${TMPFILE}
-    egrep -q 'has errors$' ${TMPFILE} && { cat ${TMPFILE}; ret=1 ;}
+linter=jsonlint
+type -p jsonlint &>/dev/null || linter=python
+
+for f in $(find docker -type f -name '*.json');do
+    if [[ ${linter} == jsonlint ]];then
+        jsonlint -s ${f} >${TMPFILE}
+        egrep -q 'has errors$' ${TMPFILE} && { cat ${TMPFILE}; ret=1 ;}
+    else
+        python -m json.tool ${f} &>/dev/null || { echo "$f: has json errors"; ret=1; }
+    fi
 done
 
 cat ${TMPFILE}
diff --git a/tox.ini b/tox.ini
index 5a3f84656a038b3d34b92f47cb3cc888fc9d5667..53c0c830e4773d02459dbd430bc0f0ae4d976bdd 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,11 +1,11 @@
 [tox]
 skipsdist = True
-envlist = validate-json
+envlist = pep8
 minversion = 1.6
 
 [testenv]
 deps = -r{toxinidir}/test-requirements.txt
 
-[testenv:validate-json]
+[testenv:pep8]
 commands = 
     {toxinidir}/tools/validate-json.sh