show error on invalid json. closes #531