Formatting and Decoding Twitter Stream JSON Output


#1

Greetings.

I’ve having trouble formatting and encoding the twitter stream that is being collected with a python script I wrote. The output looks like this:

{“created_at”:“Wed May 07 20:53:05 +0000 2014”,“id”:464145921090277379,“id_str”:“464145921090277379” … (and continues for a single entry along one line). Each line is a single tweet with massive amounts of information.

I’ve tried simply using python’s JSON module to turn the json file into a dict, but it keeps giving me an error - stating that the structure isn’t a in JSON serialization.

Ultimately, I’d like to feed the JSON output into a table format. I’m trying to get the file into a csv and go from there. I’d settle for anything readable at this point. FYI - I’m trying to stick to Python because it’s what I know.

Thanks.