

def default(self, obj):
    if hasattr(obj, 'to_json'):
        return obj.to_json()
    return json.JSONEncoder.default(self, obj)

dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/primitives/comm.py PrimJSONEncoder.default/original