MCPcopy Create free account
hub / github.com/RozDavid/UnScene3D / _read_json

Method _read_json

datasets/preprocessing/rio_preprocessing.py:111–119  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

109 return filebase
110
111 def _read_json(self, path):
112 try:
113 with open(path) as f:
114 file = json.load(f)
115 except json.decoder.JSONDecodeError:
116 with open(path) as f:
117 # in some files I have wrong escapechars as "\o", while it should be "\\o"
118 file = json.loads(f.read().replace(r"\o", r"\\o"))
119 return file
120
121
122if __name__ == "__main__":

Callers 3

process_fileMethod · 0.95
process_fileMethod · 0.45
process_fileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected