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

Function jsonUnsafe

packages/effect/src/unstable/http/HttpBody.ts:291–292  ·  view source on GitHub ↗
(body: unknown, contentType?: string)

Source from the content-addressed store, hash-verified

289 * @since 4.0.0
290 */
291export const jsonUnsafe = (body: unknown, contentType?: string): Uint8Array =>
292 text(JSON.stringify(body), contentType ?? "application/json")
293
294/**
295 * Creates a JSON HTTP body in an `Effect`.

Callers

nothing calls this directly

Calls 1

textFunction · 0.70

Tested by

no test coverage detected