Zod version:
import { z } from "zod";
type JsonParseResult<T> = { ok: true; value: T } | { ok: false; error: Error };
const parseJson = <T>(
input: string,
schema: z.ZodType<T>,Zod version:
import { z } from "zod";
type JsonParseResult<T> = { ok: true; value: T } | { ok: false; error: Error };
const parseJson = <T>(
input: string,
schema: z.ZodType<T>,