def default(self, o):
        # Convert any iterable to list
        try:
            iterable = iter(o)
        except __HOLE__:
            pass
        else:
            return list(iterable)
        if isinstance(o, (dict, list, basestring, int, long, float, bool, type(None))):
            # Let the base class handle it
            return json.JSONEncoder.default(self, o)
        else:
            # Convert it to a string
            return unicode(str(o))
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/utilities/calvinlogger.py/JSONEncoderIters.default