[issue15393] JSONDecoder.raw_decode breaks on leading whitespace

R. David Murray report at bugs.python.org
Thu Jul 19 13:56:18 CEST 2012


R. David Murray <rdmurray at bitdance.com> added the comment:

IMO this is not a bug, according to the current documentation it is working as designed.  raw_decode says it decodes a string that *starts with* a json document.

To my understanding, raw_decode is designed to be used when parsing a stream containing more than just one json document, including possibly non-json text, in which case it makes sense that the calling application would be responsible for (and want to) handle the whitespace around any such document.

I recommend closing this as invalid.  If the consensus is otherwise and a change is made, I think it would be an enhancement, not a bug fix.

----------
nosy: +r.david.murray

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


More information about the Python-bugs-list mailing list