ADD: JSON reader, and map config read from file

This commit is contained in:
2025-03-15 22:41:35 +01:00
parent 61de16af8d
commit 7a6410afb5
2 changed files with 19 additions and 7 deletions

12
json_object.py Normal file
View File

@@ -0,0 +1,12 @@
import json
class JSONObject:
def __init__(self, path):
self.path = path
def read(self):
with open(self.path, "r") as f:
return json.load(f)
def get(self, key):
return self.read()[key]