

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

dataset/ETHPy150Open tow/sunburnt/sunburnt/json.py dumps/VarMisuse@19/20 `obj`->`kwargs`