Function: json()
json(
params?):ZodJSONSchema
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:766
Parameters
params?
string |
{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>; message?: string; params?: Record<string, any>; path?: PropertyKey[]; when?: (payload) => boolean; }
abort?
boolean
If true, no later checks will be executed if this check fails. Default false.
error?
string | $ZodErrorMap<NonNullable<$ZodIssue>>
message?
string
Deprecated
This parameter is deprecated. Use error instead.
params?
Record<string, any>
path?
PropertyKey[]
when?
(payload) => boolean
If provided, the check runs only when this returns true. By default, it is skipped if prior parsing produced aborting issues.