On 11/12/14 23:15, Ben Finney wrote:

*array = json.load( { "name": "Joe", "address": "111 Street" } )*

You are passing a Python dict value to the function. JSON is a
serialisation format, and the input to ‘json.load’ must be a text
string.

Nope, its a file-like object.

The input to loads() is a text string.
The implementation of load() apparently reads the file object
to produce a string which is passed to loads()

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to