MCPcopy
hub / github.com/AndrewWalsh/openapi-devtools / parseJSON

Function parseJSON

src/utils/helpers.ts:75–82  ·  view source on GitHub ↗
(json?: string)

Source from the content-addressed store, hash-verified

73};
74
75export const parseJSON = (json?: string): JSONType => {
76 if (!json) return null;
77 try {
78 return JSON.parse(json || "");
79 } catch (e) {
80 return null;
81 }
82};
83
84export const createSchemaElseUndefined = (
85 json: JSONType

Callers 2

insertMethod · 0.90
parseRequestBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected