MCPcopy Create free account
hub / github.com/Effect-TS/effect / unsafeJson

Function unsafeJson

packages/platform/src/internal/httpBody.ts:117–118  ·  view source on GitHub ↗
(body: unknown, contentType?: string)

Source from the content-addressed store, hash-verified

115
116/** @internal */
117export const unsafeJson = (body: unknown, contentType?: string): Body.Uint8Array =>
118 text(JSON.stringify(body), contentType ?? "application/json")
119
120/** @internal */
121export const json = (body: unknown, contentType?: string): Effect.Effect<Body.Uint8Array, Body.HttpBodyError> =>

Callers 1

jsonFunction · 0.70

Calls 1

textFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…