MCPcopy Create free account
hub / github.com/callstack/agent-device / stringifyJsonObject

Function stringifyJsonObject

src/commands/management/runtime/apps.ts:348–358  ·  view source on GitHub ↗
(payload: Record<string, unknown>, field: string)

Source from the content-addressed store, hash-verified

346}
347
348function stringifyJsonObject(payload: Record<string, unknown>, field: string): string {
349 try {
350 const serialized = JSON.stringify(payload);
351 if (typeof serialized !== 'string') {
352 throw new AppError('INVALID_ARGS', `${field} must be JSON-serializable`);
353 }
354 return serialized;
355 } catch {
356 throw new AppError('INVALID_ARGS', `${field} must be JSON-serializable`);
357 }
358}
359
360function toAppBackendContext(
361 runtime: Pick<AgentDeviceRuntime, 'signal'>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…