Raising MalformedFileError when parsing the file.

Only raises the error for a JSON file.

TODO:
- MalformedFileError for CSV and XML as well