[New-bugs-announce] [issue21182] json.loads errors out on valid JSON

Yakov Keselman report at bugs.python.org
Wed Apr 9 01:42:13 CEST 2014


New submission from Yakov Keselman:

Run the following Python JSON parsing script on valid JSON:

import json
json.loads( '["[\"Residential | Furniture | Cabinets\",\"119.99\"]"]' )

Result:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python33\lib\json\__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "C:\Python33\lib\json\decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python33\lib\json\decoder.py", line 368, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting ',' delimiter: line 1 column 5 (char 4)

----------
components: IO
messages: 215780
nosy: Yakov.Keselman
priority: normal
severity: normal
status: open
title: json.loads errors out on valid JSON
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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


More information about the New-bugs-announce mailing list