Message80564
| Author |
steven.daprano |
| Recipients |
steven.daprano |
| Date |
2009年01月26日.06:24:30 |
| SpamBayes Score |
4.9415597e-05 |
| Marked as misclassified |
No |
| Message-id |
<1232951073.6.0.548540602901.issue5067@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Using the wrong sort of quotes in json gives unhelpful error messages:
>>> json.loads("{'test':'test'}")
Traceback (most recent call last):
...
ValueError: Expecting property name: line 1 column 1 (char 1)
Unless you know that strings in JSON must be delimited with
double-quotes and not single (a very surprising fact to those used to
Python) this error message is perplexing. I suggest something like:
Single-quoted strings are invalid property names: line 1 column 1
(char 1)
or
Parse error, invalid char: line 1, column 1 (char 1) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年01月26日 06:24:33 | steven.daprano | set | recipients:
+ steven.daprano |
| 2009年01月26日 06:24:33 | steven.daprano | set | messageid: <1232951073.6.0.548540602901.issue5067@psf.upfronthosting.co.za> |
| 2009年01月26日 06:24:32 | steven.daprano | link | issue5067 messages |
| 2009年01月26日 06:24:30 | steven.daprano | create |
|