(self, obj)
| 16 | |
| 17 | class SystemEncoder(json.JSONEncoder): |
| 18 | def encode(self, obj): |
| 19 | # 先序列化为字符串 |
| 20 | json_str = super().encode(obj) |
| 21 | # 移除所有空字符 |
| 22 | json_str = json_str.replace('\\u0000', '') |
| 23 | return json_str |
| 24 | |
| 25 | def default(self, obj): |
| 26 | if isinstance(obj, uuid.UUID): |
no test coverage detected