Skip to content

Commit 5dba843

Browse files
committed
Merge pull request #74 from mafintosh/is-my-json-valid
add is-my-json-valid 2.0.2 to the benchmark
2 parents e464e8d + 2490d09 commit 5dba843

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

benchmarks/draft4/validators.coffee

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ module.exports =
3939
result
4040

4141

42+
"is-my-json-valid":
43+
setup: (schema) ->
44+
require("is-my-json-valid")(schema)
45+
validate: ({validator, schema, document}) ->
46+
validator(document)
47+
error: (result) ->
48+
if result == true
49+
false
50+
else
51+
validator.errors
52+
53+
4254
## Disabled because it refuses to accept one of our schemas
4355
#"jsonschema":
4456
#setup: (schema) ->

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"amanda": "~0.5.1",
1818
"coffee-script": "~1.7",
1919
"glob": "~3.2.6",
20+
"is-my-json-valid": "^2.0.2",
2021
"jayschema": "~0.3.1",
2122
"json-gate": "~0.8.21",
2223
"json-schema-tests": "^0.1.1",

0 commit comments

Comments
 (0)