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

Bob Ippolito report at bugs.python.org
Sun Mar 1 19:00:58 CET 2009


Bob Ippolito <bob at redivi.com> 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() produces invalid JSON (from JSONable combinations of 
types)."

>>> repr(object)
"<type 'object'>"

If you don't know JSON, I'm not sure throwing random input at the JSON 
parser is going to help you. Is that how you learned XML? There's plenty 
of info in the JSON documentation and a link to json.org if you need 
help.

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


More information about the Python-bugs-list mailing list