v = json.loads("{'test':'test'}")
livibetter
livibetter at gmail.com
Sun Jan 25 16:42:11 EST 2009
On Jan 26, 5:12 am, gert <gert.cuyk... at gmail.com> wrote:
> raise ValueError(errmsg("Expecting property name", s, end))http://docs.python.org/library/json.html
> What am I doing wrong ?
You use wrong quotes, it should be wrapped by double quotes not single
quotes. Read http://json.org/:
"A string is a collection of zero or more Unicode characters,
wrapped in double quotes, ..."
>>> v = json.loads('{"test":"test"}')
>>> v
{u'test': u'test'}
More information about the Python-list
mailing list