Creating Python dict from JSON
suggest changeimport json
s = '{"wonderland": [1, 2, 3], "foo": "bar", "alice": 1}'
json.loads(s)
The above snippet will return the following:
{u'alice': 1, u'foo': u'bar', u'wonderland': [1, 2, 3]}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents