Galen Seilis <galen.sei...@gmail.com> writes: > I am having difficulty interacting with JSON. The example below if a > typical input and output:
Thank you for presenting a simple example and the resulting output. Unfortunately, your mail client has mangled it, inserting asterisks making syntax errors, and wrapping lines that should be separate. Please, in future, compose messages only in “plain text” mode. Your text examples will survive much better that way. > *import json* > *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. A literal Python text string looks like this in the code:: "foo bar baz" A literal Python dict looks like this in the code:: { "name": "Joe", "address": "111 Street" } -- \ “For fast acting relief, try slowing down.” —Jane Wagner, via | `\ Lily Tomlin | _o__) | Ben Finney _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor