mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2026-01-02 09:50:41 +00:00
Integrated smpl metadata reading
Now reads from command line and WavInfoReader interface.
This commit is contained in:
@@ -6,12 +6,14 @@ from optparse import OptionParser
|
||||
import sys
|
||||
import json
|
||||
from enum import Enum
|
||||
|
||||
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