Serhiy Storchaka added the comment:

While we here may be change error messages?

The only error which contains end position is "Extra data". And it doesn't look 
clean to me why end position should be mentioned at all (it is always len(data) 
here). I suggest to drop it, this will make error message cleaner and 
JSONDecodeError simpler.

May be mention line and column in error message only if JSON data is multiline? 
Most machine generated data has one line only. Instead of "Expecting ',' 
delimiter: line 1 column 123 (char 124)" I suggest "Expecting ',' delimiter at 
position 124". Same as in re.error.


Python tracker <>
Python-bugs-list mailing list

Reply via email to