often need to convert an object into a standard dictionary for easy serialization. lately this has been using JSON strings for storing.

Short of manual save and load routines that handle the conversion to dict, there are also some approaches that may help automate/simplify the conversion:

Googling:
convert python object to dictionary

http://stackoverflow.com/questions/61517/python-dictionary-from-an-objects-fields

In summary, try looking at:
a = Object()
a.__dict__

to see if it has what you need.

Then, the inverse, converting from a dictionary to an object (during loading):
http://stackoverflow.com/questions/1305532/convert-python-dict-to-object?rq=1

class Struct:
def __init__(self, **entries):
self.__dict__.update(entries)

I've been looking into Django more. I was wondering the best way to automatically return the correct response format for any given type of request. Specifically, I'm interested in distinguishing between html and json requests.

In the past I've just appended '/json' to a given url to get json data, but then I was curious how Rails seems to automatically know what the request format was. According to this:

http://stackoverflow.com/questions/6253826/how-does-rails-determine-incoming-request-format

"Rails determines the desired response format from the HTTP Accept header submitted by the client."

It looks like there is similar functionality in Django, but the routing is not as built in as in Rails.

From:
http://stackoverflow.com/questions/9262278/django-view-returning-json-without-using-template

You can use request.is_ajax(). But that requires that the HTTP_X_REQUESTED_WITH header is set. Most JavaScript libraries do this automatically, but if you're using some other type of client, you'll need to make sure it sets it as well. Alternatively, you can pass a querystring such as ?json with the URL and then check request.GET.has_key('json'), which is probably a little more foolproof.

More details are available here:
https://docs.djangoproject.com/en/dev/ref/request-response/