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

Gabriel Genellina report at bugs.python.org
Tue Jan 27 02:05:51 CET 2009


Gabriel Genellina <gagsl-py2 at yahoo.com.ar> 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.loads("""{"test": @?&%%}""")

so it's hard to provide a better message when the parser expects a 
generic object.

----------
nosy: +gagenellina

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


More information about the Python-bugs-list mailing list