provided that the object only contains objects that JSON can handle (lists
, tuples
, strings
, dicts
, numbers
, None
, True
and False
), you can dump it as json.dump:
import json
with open('outputfile', 'w') as fout:
json.dump(your_list_of_dict, fout)