python-frozendict icon indicating copy to clipboard operation
python-frozendict copied to clipboard

Object of type frozendict is not JSON serializable

Open wjmelements opened this issue 5 years ago • 2 comments

It seems the easiest way to accomplish this functionality without a custom serializer would be to subclass dict and call dict.__init__ in the frozendict __init__.

wjmelements avatar Mar 31 '20 00:03 wjmelements

Until we get a way to serialise frozendict, is there a simple way to turn the frozendict into a normal dict? This would be a workaround for the problem at hand, allowing to at least store it as a normal dict.

nblumoe avatar Aug 20 '20 09:08 nblumoe

An unfreeze function can be found in this open PR: https://github.com/slezica/python-frozendict/pull/20/files

nblumoe avatar Aug 20 '20 13:08 nblumoe