[Tutor] Parsing JSON with Python

Galen Seilis galen.seilis at gmail.com
Thu Dec 11 21:25:53 CET 2014


To whom it may concern,

I am having difficulty interacting with JSON. The example below if a
typical input and output:


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

*Traceback (most recent call last): File "<stdin>" , line 1, in <module>
File "C:\Python27\lib\json\__init__.py" , line 286, in load return
loads(fp.read(), AttributeError: 'dict' object has no attribute 'read' >>>*


I would appreciate assitance understanding why this doesn't work, and how I
can get up-and-running with inputing JSON code into Python.
-- 
Galen


More information about the Tutor mailing list