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

Method writeJson

packages/shell/src/memory.ts:128–137  ·  view source on GitHub ↗
(
    path: string,
    value: unknown,
    options?: StateJsonWriteOptions
  )

Source from the content-addressed store, hash-verified

126 }
127
128 async writeJson(
129 path: string,
130 value: unknown,
131 options?: StateJsonWriteOptions
132 ): Promise<void> {
133 await this.writeFile(
134 path,
135 stringifyJsonFileContent(value, path, options?.spaces)
136 );
137 }
138
139 async queryJson(path: string, query: string): Promise<unknown> {
140 return queryJsonValue(await this.readJson(path), query);

Callers

nothing calls this directly

Calls 2

writeFileMethod · 0.95
stringifyJsonFileContentFunction · 0.90

Tested by

no test coverage detected