Alan Gauld <alan.ga...@btinternet.com> writes: > 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.
Fair enough, I didn't check the ‘json.load’ documentation. Thank you for the correction. I suspect the OP wasn't aware they specified a Python dict, though, which is the main point. -- \ “Never use a long word when there's a commensurate diminutive | `\ available.” —Stan Kelly-Bootle | _o__) | Ben Finney _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor