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 | 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:14 | musically_ut | set | recipients: + musically_ut |
| 2013年10月23日 11:22:14 | musically_ut | set | messageid: <1382527334.08.0.362620105205.issue19361@psf.upfronthosting.co.za> |
| 2013年10月23日 11:22:14 | musically_ut | link | issue19361 messages |
| 2013年10月23日 11:22:13 | musically_ut | create | |