Split out sniffPackageJson and test separately
Move JSON parsing into sniffPackageJson
Handle badly-formed JSON