slezica / python-frozendict

A simple immutable mapping for python
MIT License
111 stars 22 forks source link

Object of type frozendict is not JSON serializable #32

Open wjmelements opened 4 years ago

wjmelements commented 4 years ago

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__.

nblumoe commented 4 years ago

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 commented 4 years ago

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