As I said - you have complex structure, so you need to check if the value is (for example) list/dict, then you need to check values within this data structure too.
In your example you have
so it is at least two levels deep that you have to check
what is the best way to do it depends on your data and you know your data best
can you post example of your json file so that we can get better understanding of the data structure that you work with?
In your example you have
Output:u'user_mentions': [{u'id': 254599256,
u'id_str': u'254599256',
u'indices': [3, 11],
u'name': u'Alejandro Fargosi',
u'screen_name': u'fargosi'}]},
u'favorite_count': 0,
u'favorited': False,
u'filter_level': u'low',
u'geo': None,
u'id': 1005817329459097600L,
u'id_str': u'1005817329459097600',
u'in_reply_to_screen_name': None,
u'in_reply_to_status_id': None}]
the value is list of dicts, and there are elements in the dict that has value None.so it is at least two levels deep that you have to check
what is the best way to do it depends on your data and you know your data best
can you post example of your json file so that we can get better understanding of the data structure that you work with?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs