Attempting to protect against memory leaks when an invalid JSON file is parsed.  Added a new test case with an invalid file.