-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You should include the module is-my-json-valid by mafintosh, It's the fastest #72
Comments
I mean in your benchmarks |
If the validator doesn't support the full spec, it is not a JSON Schema validator. I can write a very fast validator that doesn't support all of JSON Schema: is_valid = (schema, document) ->
true That's a reductio ad absurdum, obviously. But the point should be clear. If a validator doesn't reject documents that are invalid according to the JSON Schema standard, there can be no valid (pun intended) benchmarking of it in comparison to actual JSON Schema implementations. |
I do want to review is-my-json-valid, though. And we should add to the benchmarks a check that the tested libraries can actually detect invalid documents. |
Actually I think it does the spec. — On Sun, Jan 18, 2015 at 7:05 PM, Matthew King [email protected]
|
is-my-json-valid should support all of schema v4 (except for refRemote, ref, which this validator doesn't seem to support either) |
It will be interesting to see how you handle this. You have a chance to really shine for the open source community. |
Good deal. No, JSCK doesn't do refRemote yet. |
@mafintosh, I'm seeing some indications that is-my-json-valid does not, in fact, support all of JSON Schema draft 4. Feel free to email me if you want to discuss this in private. |
@automatthew we can do it in public. which parts are missing? |
I don't see where, for instance, "multipleOf" is implemented. Following that line of inquiry, I changed the value of that keyword in your test fixture to something that should cause failures for both the valid and invalid documents. All tests still pass. |
sorry, we're going to pass on this. we can give you a shout-out in the readme or something. is-my-json-valid is very fast but it doesn't seem to properly support the spec. lots more detail here: https://www.pandastrike.com/posts/20150121-the-fast-and-the-spurious |
I found it very interesting. |
Didn't know there was a json-schema test-suite. I'll make is-my-json-valid pass that. The orderly thing isn't used for anything internally (or has anything to do with the performance). When I researched json-schema initially i just liked the syntax but since I don't really use it anymore I'll probably remove it at some point. |
You may also find these documents helpful: http://tools.ietf.org/html/draft-zyp-json-schema-04 http://tools.ietf.org/html/draft-fge-json-schema-validation-00 |
I took out most of the stuff about Orderly. Wasn't quite sure how that worked anyway. The good news is every time I tried it, I got |
@gilesbowkett @automatthew is-my-json-valid 2.0.0 now passes the entire JSONSchema draft4 test suite (with exception of remote refs and multibyte unicode string with min/max length) Running your benchmark yields the following result
is-my-json-valid is still consistently ~5x faster than JSCK |
It still is :-) But I'm really glad that you helped mafintosh make is-my-json-valid pass the tests. |
reopened because #74, and well done @mafintosh. just FYI, the pandastrike.com blog post about this will probably get updated accordingly. |
@gilesbowkett cool! looking forward to reading it |
here you go: https://www.pandastrike.com/posts/20150123-congrats-imjv Still got to add an update to the pandastrike.com post about IMJV, but my personal blog post was updated with a link. |
resolved in 5dba843 |
is-my-json-valid is the fastest JSON-schema validator around.
It blows the competition out of the water in speed.
There is a blog post about it here:
http://cosmicrealms.com/blog/2014/08/29/benchmark-of-node-dot-js-json-validation-modules-part-3/
The text was updated successfully, but these errors were encountered: