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

Function json

packages/platform/node/src/NodeHttpIncomingMessage.ts:97–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 }
96
97 get json(): Effect.Effect<Schema.Json, E> {
98 return Effect.flatMap(this.text, (text) =>
99 Effect.try({
100 try: () => text === "" ? null : JSON.parse(text),
101 catch: this.onError
102 }))
103 }
104
105 get jsonUnsafe(): Schema.Json {
106 return Effect.runSync(this.json)

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected