This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, ezio.melotti, pitrou, r.david.murray, rhettinger, serhiy.storchaka, tshepang
Date 2014-02-02.12:49:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391345376.36.0.542650302285.issue20453@psf.upfronthosting.co.za>
In-reply-to
Content
"No JSON object could be decoded, expecting value" is too expensive and second part of this message just repeat first part. The message can be shortened to "No JSON object could be decoded". But this is not fully correct. JSON term "object" corresponds to Python dict. But this error raised when arbitrary JSON value expected: "object", "array" (corresponded to Python list), string, number or boolean. That is why I had changed "object" to "value". So may be the "No JSON value could be decoded" is more correct.

Also note other differences between 3.3 and 3.4:

json.loads('[')
3.3: Expecting object: line 1 column 1 (char 0)
3.4: Expecting value: line 1 column 2 (char 1)

json.loads('[,')
3.3: No JSON object could be decoded
3.4: Expecting value: line 1 column 2 (char 1)

json.loads('[42')
3.3: Expecting object: line 1 column 3 (char 2)
3.4: Expecting ',' delimiter: line 1 column 4 (char 3)

json.loads('[42,')
3.3: Expecting object: line 1 column 4 (char 3)
3.4: Expecting value: line 1 column 5 (char 4)

json.loads('["')
3.3: end is out of bounds
3.4: Unterminated string starting at: line 1 column 2 (char 1)

json.loads('["foo')
3.3: Unterminated string starting at: line 1 column 2 (char 1)
3.4: Unterminated string starting at: line 1 column 2 (char 1)

To me new error messages look more informative and more correct.
History
Date User Action Args
2014-02-02 12:49:36serhiy.storchakasetrecipients: + serhiy.storchaka, barry, rhettinger, pitrou, ezio.melotti, r.david.murray, tshepang
2014-02-02 12:49:36serhiy.storchakasetmessageid: <1391345376.36.0.542650302285.issue20453@psf.upfronthosting.co.za>
2014-02-02 12:49:36serhiy.storchakalinkissue20453 messages
2014-02-02 12:49:36serhiy.storchakacreate