import type { z } from 'zod' export async function readJson( response: Response, schema: Schema, ): Promise> { return schema.parse(await response.json()) }