top | item 41794457

(no title)

shadowfiend | 1 year ago

What’s the go-to reason to use this over ajv? In particular, being rooted in JSON Schema feels like a pretty big win tooling-wise and interop-wise.

discuss

order

petesergeant|1 year ago

You can reflect TS types out of it. There are 3rd party libraries to generate JSON Schemas from Zod objects, which is helpful if you have non-TS clients you want to support

shadowfiend|1 year ago

Ajv has supported that for at least a couple of years afaik, and consumes JSON Schema natively which is good for consuming other APIs, not just feeding external clients—its base data format is interoperable, basically.

That’s mostly why I’m curious about the lack of mention :)

Timon3|1 year ago

Personally a big factor: I haven't had the Zod creator scrape my email and send me a newsletter asking for money. That kind of soured me on ajv.

shadowfiend|1 year ago

Ohp. That sounds pretty annoying. Was this a GitHub scrape of places using the library?