MCPcopy
hub / github.com/codeaashu/claude-code / jsonParse

Function jsonParse

src/utils/slowOperations.ts:204–211  ·  view source on GitHub ↗
(text, reviver)

Source from the content-addressed store, hash-verified

202 * const data = jsonParse(jsonString)
203 */
204export const jsonParse: typeof JSON.parse = (text, reviver) => {
205 using _ = slowLogging`JSON.parse(${text})`
206 // V8 de-opts JSON.parse when a second argument is passed, even if undefined.
207 // Branch explicitly so the common (no-reviver) path stays on the fast path.
208 return typeof reviver === 'undefined'
209 ? JSON.parse(text)
210 : JSON.parse(text, reviver)
211}
212
213/**
214 * Wrapped structuredClone with slow operation logging.

Callers 15

deserializeLogEntryFunction · 0.85
runFunction · 0.85
renderToolResultMessageFunction · 0.85
callFunction · 0.85
TaskOutputResultDisplayFunction · 0.85
callFunction · 0.85
readJsonFileFunction · 0.85
parseJsonEntriesFunction · 0.85
renderToolResultMessageFunction · 0.85
loadKeybindingsFunction · 0.85
tryFormatJsonFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected