I have problem with parsing some direct messages. As described here:
JSONed direct message contains key 'recipient'. Value of this key is dictionary with information about dm's recipient. And I parsing this information like this (in python):
res_msg['receivers'] = msg['recipient']['screen_name']
But for several messages I've got error for code above:
TypeError: string indices must be integers, not str
Why in this case msg['recipient'] is not dictionary?
How can I get screen name of recipient?
Does 'recipient_screen_name' value always contains screen name or also may be empty?