Open megachweng opened 1 year ago
+1
It works if you forego the optional indent= parameter to jsonref.dumps(), so this code is a very inefficient workaround:
unref = json.loads(jsonref.dumps(db))
print(json.dumps(unref, indent=2))
I had the same issue when I passed indent=2 to jsonref.dumps()
Sample json
DcProvinceVO and DcDistrictVO are circular referenced, there is not issue when
jsonref.loads
the raw json, but raise Exception whenjsonref.dumps
Traceback: