News for hackers. Stuff that matters.
Re:Zod 4 by 0x62 on Monday May 19, 2025 @12:07PM (#44031328)
Zod 4 supports converting a Zod schema to JSON-Schema (natively, this has always been possible with 3rd-party libs).

One key difference is preprocessing/refine. With Zod, you can provide a callback before running validation, which is super useful and can't be represented in JSON. This comes in handy more often than you'd think - e.g converting MM/DD/YYYY to DD/MM/YYYY before validating as date.

Re:Zod 4 by silverwind on Monday May 19, 2025 @02:44PM (#44033291)
Does it support the other way around too? I'd live to ditch AJV.