(self, obj)
| 2310 | |
| 2311 | class EnumEncoder(json.JSONEncoder): |
| 2312 | def default(self, obj): |
| 2313 | if isinstance(obj, Enum): |
| 2314 | return obj.value |
| 2315 | if isinstance(obj, bytes): |
| 2316 | return base64.b64encode(obj).decode("utf-8") |
| 2317 | return super().default(obj) |
| 2318 | |
| 2319 | |
| 2320 | def _dataclass_to_dict(obj): |