Added check for invalid json.
Merge pull request #19 from patrick91/invalid_json

Added check for invalid json.