Easily convert objects to hashes.