{"record":{"id":"ec2b68eee9e153ba","repo":"different-ai/openwork","slug":"json-name-is-not-available-in-codemode","errorCode":null,"errorMessage":"JSON.${name} is not available in CodeMode.","messagePattern":"JSON\\.(.+?) is not available in CodeMode\\.","errorType":"exception","errorClass":"InterpreterRuntimeError","httpStatus":null,"severity":"error","filePath":"packages/codemode/src/stdlib/json.ts","lineNumber":12,"sourceCode":"import {\n  type AstNode,\n  CodeModeFunction,\n  InterpreterRuntimeError,\n  supportedSyntaxMessage,\n} from \"../interpreter/model.js\"\nimport { copyIn, copyOut } from \"../tool-runtime.js\"\n\nexport const jsonStatics = new Set([\"stringify\", \"parse\"])\n\nexport const invokeJsonMethod = (name: string, args: Array<unknown>, node: AstNode): unknown => {\n  if (!jsonStatics.has(name)) throw new InterpreterRuntimeError(`JSON.${name} is not available in CodeMode.`, node)\n  switch (name) {\n    case \"stringify\": {\n      const replacer = args[1]\n      if (Array.isArray(replacer) || replacer instanceof CodeModeFunction) {\n        throw new InterpreterRuntimeError(\n          \"JSON.stringify replacers are not supported in CodeMode.\",\n          node,\n          \"UnsupportedSyntax\",\n          [supportedSyntaxMessage],\n        )\n      }\n      const space = args[2]\n      const indent = typeof space === \"number\" || typeof space === \"string\" ? space : undefined\n      return JSON.stringify(copyOut(copyIn(args[0], \"JSON.stringify value\")), null, indent)\n    }\n    case \"parse\": {\n      const text = args[0]\n      if (typeof text !== \"string\") throw new InterpreterRuntimeError(\"JSON.parse expects a string.\", node)","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/codemode/src/stdlib/json.ts#L1-L30","documentation":"Error \"JSON.${name} is not available in CodeMode.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/codemode/src/stdlib/json.ts:12 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}