Example of using Python's json module, other tips. 

Use Python's json module to serialize GeoJSON feature properties.

I've also made the code more efficient by eliminating redundant
function calls, using `in` tests against numerical types, only
getting a list of feature fields once. I've also deleted the
unnecessary `del` statements (you almost never have to do this in
Python) and the empty return statements. I also fixed identation.

Wish I could test this properly, but it should be functional and
hopefully helpful! These functions are clearly going to be a
big help to a lot of folks.