Ensure JSON encoding errors are never masked.
Ensure JSON encoding errors are never masked.

Turns out json/simplejson raises a TypeError but other JSON packages raise a
custom exception type. By simplifying the code a little, and handling a
file-like body more explicitly, we can leave JSON errors to escape naturally.

djc/couchdb-python,djc/couchdb-python,infinit/couchdb-python