6 ms·
Plenty of web frameworks can validate via JSON Schema, using ajv under the hood. (I use Fastify.) io-ts is pretty scary, though. I like the `runtypes` library
by eropple 7y ago
Plenty of web frameworks can validate via JSON Schema, using ajv under the hood. (I use Fastify.)
io-ts is pretty scary, though. I like the `runtypes` library but it doesn't help me express my types in a way clients can consume, which, enh.
- Kinrany 7y agoI also liked runtypes more, but it turns out composing io-ts codecs is perfectly readable, and being able to deserialize at the same time/instead of validating is very convenient. Caveat, I've only been using it for two weeks.