[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed now. Thanks Serhiy for the patch! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9854520c8200 by Antoine Pitrou in branch '3.2': Issue #5067: improve some json error messages. http://hg.python.org/cpython/rev/9854520c8200 New changeset 7523ab4e6e06 by Antoine Pitrou in branch 'default': Issue #5067: improve some json error mess

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-24 Thread Georg Brandl
Georg Brandl added the comment: Agreed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would say this is a bugfix, so it can go in after the beta. Georg? -- assignee: bob.ippolito -> components: -Documentation nosy: +georg.brandl, pitrou stage: -> patch review ___ Python tracker

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Any chance to commit the patch today and to get this feature in Python 3.3? -- ___ Python tracker ___

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2012-06-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch adapted for Python 3.3. Consistently changed messages in C code, docs and docstrings. -- components: +Documentation nosy: +storchaka versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 Added file: http://bugs.python.org/file26014/json-mes

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-03-01 Thread Bob Ippolito
Bob Ippolito added the comment: Er, sorry, missed "(from JSONable combinations of types)". It's early. Anyway, I can change the error message, but I will not make it special- case single quotes for its own error message. I will have to think about what the message could say instead. Note that

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-03-01 Thread Bob Ippolito
Bob Ippolito added the comment: I don't really want to see looser input requirements, making a JSON parser that is compatible with a subset of Python repr output isn't a design goal of mine. This is absolutely false: "Because single quotes are the only way (AFAIK) in which Python's repr() pro

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-02-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on Steven's request for a better error message. +1 on Beni's request for looser input requirements for better interoperability with Python's repr. OTOH, I've never found it hard to write: s.replace("'", '"'). -- assignee: -> bob.ippolito nosy:

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-02-28 Thread Cherniavsky Beni
Cherniavsky Beni added the comment: Perhaps it should not be an error at all? The default should probably stay strict to the spec, but IMHO the module should provide an optional lenient parsing mode that also accepts single quotes. Why support single quotes and not any other imaginable deviati

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-26 Thread Gabriel Genellina
Changes by Gabriel Genellina : -- keywords: +patch Added file: http://bugs.python.org/file12871/json-messages.diff ___ Python tracker ___ _

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-26 Thread Gabriel Genellina
Gabriel Genellina added the comment: This patch provides a better error message for this case:: json.loads("""{'test': "test"}""") but still doesn't help in this one:: json.loads("""{"test": 'test'}""") 'test' looks like garbage to JSON (it *is* garbage!), exactly the same as:: json.

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-26 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-25 Thread Steven D'Aprano
New submission from Steven D'Aprano : 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 deli