How to JSON serialize sets?
I have a Python set that contains objects with __hash__ and __eq__ methods in order to make certain no duplicates are included in the collection. I need to json encode this result set, but passing even an empty set to the json.dumps method raises a TypeError. File “/usr/lib/python2.7/json/encoder.py”, line 201, in encode chunks = self.iterencode(o, … Read more