Internal benedict reference to old value
kikohs opened this issue · comments
I've opened an issue on ORJSON which I'm using to serialize benedict dicts.
ijl/orjson#281
Basically I don't understand why something like this could happen:
from benedict import benedict
import orjson
d = benedict({
"internal": benedict({
"mykey": "OLD"
})
})
d['internal'] = benedict({
"mykey": "NEW"
})
res = orjson.dumps(d)
print(res)
b'{"internal":{"mykey":"OLD"}}'
It should be "NEW".
Could you please explain how benedict handles sub benedict references?
Or why this would happen, thank you.
@kikohs thank you for reporting this, I will add a test case as soon as possible.
@kikohs you can upgrade to 0.25.2
version.