Support for http://json-schema.org/ and performance #173

Closed
a-c-m opened this Issue Feb 7, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@a-c-m

a-c-m commented Feb 7, 2014

I just read an interesting blog post http://cosmicrealms.com/blog/2014/02/07/benchmark-of-node-dot-js-json-validation-modules-part-2/

Which has joi running as one of the slower candidates and also calls out joi for not supporting json-schema.org.

Was wondering your thoughts.

@hueniverse

This comment has been minimized.

Show comment
Hide comment
@hueniverse

hueniverse Feb 8, 2014

Member

Thanks for the link. It's nice to see people include joi in their tests.

On performance, we have not seen it as an issue. If it is, we can look where we can optimize. But it is really designed for ease of use above most other things. Also see hapijs/hapi#1326.

On json-schema - we don't like it. It is hard to read, write, and maintain. It also doesn't support some of the relationships joi supports. We have no intention of supporting it. However, hapi will soon allow you to use whatever you want.

Member

hueniverse commented Feb 8, 2014

Thanks for the link. It's nice to see people include joi in their tests.

On performance, we have not seen it as an issue. If it is, we can look where we can optimize. But it is really designed for ease of use above most other things. Also see hapijs/hapi#1326.

On json-schema - we don't like it. It is hard to read, write, and maintain. It also doesn't support some of the relationships joi supports. We have no intention of supporting it. However, hapi will soon allow you to use whatever you want.

@hueniverse hueniverse closed this Feb 8, 2014

@hueniverse hueniverse added the question label Feb 8, 2014

@a-c-m

This comment has been minimized.

Show comment
Hide comment
@a-c-m

a-c-m Feb 9, 2014

Many thanks for the rapid response. I'm constantly impressed by how fast you engage with the community around hapi (as well as being impressed by hapi itself), so thank you again.

The change in hapi to support custom validation tools would be very interesting. I will keep my eye out for it in the roadmap / release notes.

a-c-m commented Feb 9, 2014

Many thanks for the rapid response. I'm constantly impressed by how fast you engage with the community around hapi (as well as being impressed by hapi itself), so thank you again.

The change in hapi to support custom validation tools would be very interesting. I will keep my eye out for it in the roadmap / release notes.

@tlivings

This comment has been minimized.

Show comment
Hide comment
@tlivings

tlivings Sep 21, 2014

I've been working on a json-schema to joi schema utility with the intended purpose of something like input validation for swagger schemas or otherwise..

Joi is actually a lot faster, from what I can tell, than any json schema validator. I question the above blog's benchmark and wonder if they were creating the joi schema as part of the iteration (which would be slower than creating it as setup).

Anyway, here is a link: https://github.com/tlivings/enjoi

I've been working on a json-schema to joi schema utility with the intended purpose of something like input validation for swagger schemas or otherwise..

Joi is actually a lot faster, from what I can tell, than any json schema validator. I question the above blog's benchmark and wonder if they were creating the joi schema as part of the iteration (which would be slower than creating it as setup).

Anyway, here is a link: https://github.com/tlivings/enjoi

@gilesbowkett gilesbowkett referenced this issue in pandastrike/jsck Nov 13, 2014

Closed

benchmark against Joi #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment