Difficulty w/json keys
J. Cliff Dyer
jcd at sdf.lonestar.org
Fri Apr 23 12:06:38 EDT 2010
You need to know what your input data actually looks like, and the best
thing for that is a little bit of formatting. I bet you can figure out
the problem yourself, once you see the structure of your data more
clearly. I've reformatted the JSON for you to help out.
On Fri, 2010-04-23 at 07:20 -0700, Red wrote:
> ------ Two Sample Twitter lines -------------
{
"text":"tech managers what size for your teams? better to have 10-20
ppl per manager or 2-5 and have the managers be more hands
on?",
"in_reply_to_user_id":null,
"coordinates":null,
"geo":null,
"created_at":"Thu Apr 22 17:35:42 +0000 2010",
"contributors":null,
"source":"<a href=\"http://twitterfeed.com\" rel=\"nofollow
\">twitterfeed</a>",
"in_reply_to_status_id":null,
"place":null,
"truncated":false,
"in_reply_to_screen_name":null,
"user": {
"favourites_count":0,
"profile_text_color":"000000",
"time_zone":"Eastern Time (US & Canada)",
"created_at":"Tue Oct 27 19:50:51 +0000 2009",
"statuses_count": 286,
"notifications":null,
"profile_link_color":"0000ff",
"description":"I write code and talk to people.",
"lang":"en",
"profile_background_image_url":"http://s.twimg.com/a/
1271891196/images/themes/theme1/bg.png",
"profile_image_url":"http://s.twimg.com/a/1271891196/images/
default_profile_0_normal.png",
"location":"Near the water.",
"contributors_enabled":false,
"following":null,
"geo_enabled":false,
"profile_sidebar_fill_color":"e0ff92",
"profile_background_tile":false,
"screen_name":"sstatik",
"profile_sidebar_border_color":"87bc44",
"followers_count": 40,
"protected":false,
"verified":false,
"url":"http://elliotmurphy.com/",
"name":"statik",
"friends_count":18,
"id":85646316,
"utc_offset":-18000,
"profile_background_color":"9ae4e8"
},
"id": 12651537502,
"favorited":false
}
{
"delete": {
"status":{
"id":12650137902,
"user_id":128090723
}
}
}
More information about the Python-list
mailing list