MCPcopy Index your code
hub / github.com/massCodeIO/massCode / readJsonFile

Function readJsonFile

src/main/http/import/postman.ts:39–47  ·  view source on GitHub ↗
(file: HttpImportFile, warnings: HttpImportWarning[])

Source from the content-addressed store, hash-verified

37}
38
39function readJsonFile(file: HttpImportFile, warnings: HttpImportWarning[]) {
40 try {
41 return JSON.parse(file.content) as unknown
42 }
43 catch {
44 addWarning(warnings, file.name, 'Invalid JSON skipped')
45 return null
46 }
47}
48
49function isJsonFile(file: HttpImportFile): boolean {
50 return file.name.toLowerCase().endsWith('.json')

Callers 1

parsePostmanFilesFunction · 0.85

Calls 1

addWarningFunction · 0.90

Tested by

no test coverage detected