

def dump(obj, fp, *args, **kwargs):
    if isinstance(obj, SolrResponse):
        obj = list(obj)
    elif isinstance(obj, SolrResult):
        obj = obj.docs
    return json.dump(obj, fp, *args, cls=SunburntJSONEncoder, **kwargs)

dataset/ETHPy150Open tow/sunburnt/sunburnt/json.py dump/original