Author musically_ut
Recipients musically_ut
Date 2013-10-23.11:22:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za>
In-reply-to
Content
The JSON parser currently throws exceptions which contain information about where the error happened but this information is encoded in a string and not available to the programmer. This leads to issues like this: http://stackoverflow.com/questions/19519409/how-to-get-error-location-from-json-loads-in-python

Would it be a problem if the errors thrown were specialized exceptions, e.g. JSONParsingError, which has ValueError as a base class with these details (line number, char number, etc.) exposed as public members? The changes required seem to be limited to changing http://hg.python.org/cpython/file/4c4f31a1b706/Lib/json/decoder.py and the related documentation.
History
Date User Action Args
2013-10-23 11:22:14musically_utsetrecipients: + musically_ut
2013-10-23 11:22:14musically_utsetmessageid: <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za>
2013-10-23 11:22:14musically_utlinkissue19361 messages
2013-10-23 11:22:13musically_utcreate