Fixing problem with returned content not being proper JSON format

If the body is not in proper JSON (e.g. the service returns an HTML file with an error in it instead of proper JSON - which was the case with the JIRA server) the script fails badly. This fix takes care of that.