When a type implements custom JSON marshalling, the autogenerated zod schema is very likely wrong. The new option WithStrictCustomSchemas() (using the functional option pattern) can be used to reject conversion when a type has a MarshalJSON() method but no custom schema.
When a type implements custom JSON marshalling, the autogenerated zod schema is very likely wrong. The new option
WithStrictCustomSchemas()
(using the functional option pattern) can be used to reject conversion when a type has aMarshalJSON()
method but no custom schema.