3 ms·
I've also used AJV before. https://github.com/epoberezkin/ajv https://github.com/epoberezkin/ajv
by Klathmon 8y ago
I've also used AJV before.
https://github.com/epoberezkin/ajv https://github.com/epoberezkin/ajv
- root_axis 8y agoMy company migrated everything away from joi in favor of AJV. Joi isn't serialisable and the maintainers are hostile to the idea of adding that capability. There are some 3rd party extensions to add serialization support, but they are not feature-complete. I also find the declarative nature of JSON Schema preferable to joi's semi-imperative API which is occasionally quite difficult to debug.
- steve_adams_86 8y agoWhy I like AJV or similar options is because you get to declare what you expect with a simple schema and it rarely needs to get complicated. It's more overhead than simple functional approaches combined with conditional statements, but I think it's more approachable. Otherwise I find it doesn't leave too much of a margin for error and it's reasonably fast. It's a personal preference, but I prefer it far more than a fluent interface. I actually avoid those now despite really loving them in the past.