JsonParse
JsonParse<
TResult> = (value) => {data:TResult;success:true; } | {error:unknown;success:false; }
Validates and narrows a 'json' value, reporting success with the parsed data or failure with
the error, in the shape of zod’s safeParse.
Type Parameters
Section titled “Type Parameters”TResult
Section titled “TResult”TResult
The type the parser produces on success.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”{ data: TResult; success: true; } | { error: unknown; success: false; }

