import simplejson
my_structure = {'name': 'Joe', 'age': 27, 'numbers': [1, 2, 3, 4, 5],
    'subdict': {'first': 1, 'second': 2, 'third': 3}}
json = simplejson.dumps(my_structure)
Python human readable object serialization