Fixed bug where unterminated JSON did not raise an exception