Message165829
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 |
|
Date |
User |
Action |
Args |
2012-07-19 10:09:56 | aalien | set | recipients:
+ aalien |
2012-07-19 10:09:56 | aalien | set | messageid: <1342692596.02.0.962530841473.issue15393@psf.upfronthosting.co.za> |
2012-07-19 10:09:55 | aalien | link | issue15393 messages |
2012-07-19 10:09:54 | aalien | create | |
|