<分区>
所以我有一些我想序列化为 JSON 的 python 字典
{'someproperty': 0, 'anotherproperty': 'value', 'propertyobject': SomeObject(someproperty=0, anotherproperty=0)}
但是 json.dumps
抛出一个 TypeError: SomeObject(someproperty=0, anotherproperty=0) is not JSON serializable
那么我怎样才能正确地序列化我的 python 字典呢?