I am creating one Response Model in python in which one of the property is assigned value as lets say 23.12.I am using the following code to convert respone model to json object .
orders.append(json.dumps(json.dumps(response, default=obj_dict)))
where obj_dict is defined like this :
def obj_dict(obj):
if isinstance(obj,decimal.Decimal):
return obj
return obj.__dict__
As decimal does not have dict property so thought of parsing the value above and returning the obj but getting the following error:
ValueError: Circular reference detected