[New-bugs-announce] [issue15393] JSONDecoder.raw_decode breaks on leading whitespace
Antti Laine
report at bugs.python.org
Thu Jul 19 12:09:56 CEST 2012
New submission from Antti Laine <antti.a.laine at iki.fi>:
raw_decode on json.JSONDecoder does not handle leading whitespace. According to RFC 4627, section 2, whitespace can precede an object. With json.loads leading whitespace is handled just fine.
d = json.JSONDecoder()
d.raw_decode(' {}')
ValueError: No JSON object could be decoded
Tested with versions 2.6.7, 2.7.3, 3.1.3 and 3.2.3
----------
components: Library (Lib)
messages: 165829
nosy: Antti Alien
priority: normal
severity: normal
status: open
title: JSONDecoder.raw_decode breaks on leading whitespace
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15393>
_______________________________________
More information about the New-bugs-announce
mailing list