[#1875] John/Kavitha - Added test for malformed json handling and improved error message.
Merge pull request #577 from johncowie/master

[#1875] John/Kavitha - Added test for malformed json handling and improv...