Dedent for clarity
Refactor using list comprehensions
Replace code duplication with loop
Chain some if statements
Move some imports
Comprehension refactors
dictionary literal refactors
Generic refactors
try's should contain minimal code

specifically, the code that will raise the exception you want to catch;
the ValueError for invalid json
Cleanup code duplication, verbosity
Cleanup whitespace
Merge pull request #26 from Mause/master

Lots of small refactors