[issue18958] Exception('No JSON object could be decoded') when parsing a valid JSON

Vajrasky Kok report at bugs.python.org
Sat Sep 7 15:10:19 CEST 2013


Vajrasky Kok added the comment:

>>> a = open('/tmp/input.json')
>>> b = a.read()
>>> b[0]
'\ufeff'
>>> import json
>>> json.loads(b[1:])
loads just fine....
>>> json.loads(b)
chokes.....


Whether python json module should handle '\ufeff' gracefully or not, I am not sure. Let me investigate it.

----------
nosy: +vajrasky

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18958>
_______________________________________


More information about the Python-bugs-list mailing list