MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / parse_file

Method parse_file

KVCOMM/tools/reader/readers.py:57–65  ·  view source on GitHub ↗
(file_path: Path)

Source from the content-addressed store, hash-verified

55
56class JSONReader(Reader):
57 def parse_file(file_path: Path) -> list:
58 logger.info(f"Reading JSON file from {file_path}.")
59 try:
60 with open(file_path, "r") as f:
61 data = json.load(f)
62
63 return data
64 except:
65 return []
66
67 def parse(self, file_path: Path) -> str:
68 logger.info(f"Reading JSON file from {file_path}.")

Callers 2

mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected