Skip to content

How does TypeCompiler validation compare to ajv validation? #520

Answered by sinclairzx81
FabianFrank asked this question in Q&A
Discussion options

You must be logged in to vote

@FabianFrank Hi!

The TypeCompiler has actually been around for a while (just over a year) and works quite well. I personally use it over Ajv these days, and there's a few ecosystem frameworks integrating it into their infrastructure. It's biggest draw is the JIT performance (as benchmarked here and here) (currently the fastest available for JavaScript afaik)

The decision to move from Ajv to TypeCompiler really just depends on how "all-in" you want to go with TypeBox. Be mindful that the compiler isn't a typical JSON Schema validator as much as it is a TypeBox type validator. While it operates on the same schematics Ajv does, internally it uses TypeBox's symbols and exact schema representa…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by FabianFrank
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants