()
| 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) |