Creating JSON from Python dict

suggest change
import json
d = {
    'foo': 'bar',
    'alice': 1,
    'wonderland': [1, 2, 3]
}
json.dumps(d)

The above snippet will return the following:

'{"wonderland": [1, 2, 3], "foo": "bar", "alice": 1}'

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents