flpelerin commited on
Commit
021102d
·
1 Parent(s): fa99492

Update file util.py

Browse files
Files changed (1) hide show
  1. util.py +3 -3
util.py CHANGED
@@ -5,13 +5,13 @@ import json
5
  class ConfigParser:
6
  def __init__(self, path: str):
7
  with open(path, 'r') as f:
8
- json_obj = json.load(f)
9
 
10
- config = json.loads(json_obj, object_hook=lambda x: SimpleNamespace(**x))
11
 
12
  self.path = path
13
  self.config = config
14
- self.json_obj = json_obj
15
 
16
 
17
 
 
5
  class ConfigParser:
6
  def __init__(self, path: str):
7
  with open(path, 'r') as f:
8
+ json_str = f.read()
9
 
10
+ config = json.loads(json_str, object_hook=lambda x: SimpleNamespace(**x))
11
 
12
  self.path = path
13
  self.config = config
14
+ self.json_str = json_str
15
 
16
 
17