mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2026-01-02 01:40:42 +00:00
Merge branch 'feature-smpl' into maint-poetry
This commit is contained in:
@@ -7,12 +7,15 @@ import os
|
||||
import json
|
||||
from enum import Enum
|
||||
import importlib.metadata
|
||||
from base64 import b64encode
|
||||
|
||||
|
||||
class MyJSONEncoder(json.JSONEncoder):
|
||||
def default(self, o):
|
||||
if isinstance(o, Enum):
|
||||
return o._name_
|
||||
elif isinstance(o, bytes):
|
||||
return b64encode(o).decode('ascii')
|
||||
else:
|
||||
return super().default(o)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user