add parse_freqs() method

This commit is contained in:
surtur 2021-12-16 04:34:24 +01:00
parent b31df6934e
commit 46659d9bd5
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -27,3 +27,19 @@ class da_detector:
except Exception as e:
raise e
return data
def parse_freqs(self, path):
import json
fullpath = freqs_folder + path
try:
with open(fullpath, 'r') as f:
j_data = f.read()
except Exception as e:
raise e
try:
obj = json.loads(j_data)
except Exception as e:
raise e
return obj