MCPcopy Create free account
hub / github.com/cloudflare/agents / updateJson

Method updateJson

packages/shell/src/memory.ts:143–151  ·  view source on GitHub ↗
(
    path: string,
    operations: StateJsonUpdateOperation[]
  )

Source from the content-addressed store, hash-verified

141 }
142
143 async updateJson(
144 path: string,
145 operations: StateJsonUpdateOperation[]
146 ): Promise<StateJsonUpdateResult> {
147 const current = await this.readJson(path);
148 const updated = updateJsonValue(current, operations, path);
149 await this.writeFile(path, updated.content);
150 return updated;
151 }
152
153 async exists(path: string): Promise<boolean> {
154 return this.fs.exists(path);

Callers

nothing calls this directly

Calls 3

readJsonMethod · 0.95
writeFileMethod · 0.95
updateJsonValueFunction · 0.90

Tested by

no test coverage detected