WINDOWS下,中文JSON格式读取报错处理:ValueError: No JSON object could be decoded

时间:2015-10-21 15:30:10   收藏:0   阅读:885

 

File "C:\Python27\lib\json\__init__.py", line 290, in load
**kw)
File "C:\Python27\lib\json\__init__.py", line 351, in loads
return cls(encoding=encoding, **kw).decode(s)
File "C:\Python27\lib\json\decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python27\lib\json\decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

记得WINDOWS里的UTF-8还分有没有BOM呢~~

技术分享

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!