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

Function jsonParse

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

Source from the content-addressed store, hash-verified

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

Callers 15

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

Calls

no outgoing calls

Tested by

no test coverage detected