Comments (8)
Performance depends on many factors. How do you load your documents and schema ?
how do you perform the validations ? what kind of loaders are you using ? etc...
Showing some code would help.
from gojsonschema.
First of all: Validated 1000 jsons in 1.53061351s (may be I'm wrong and it's good result). It result for failed json, but I can test for passed too.
short example:
dataSchema,_ = jsonschema.NewSchema( jsonschema.NewReferenceLoader("file://"+ *dataSchemaFile) )
for {
dat := jsonschema.NewStringLoader("some long json string")
res,_ := dataSchema.Validate(dat)
}
from gojsonschema.
So that's 1.5 ms for each JSON. Is that too slow ?
from gojsonschema.
I look at https://github.com/ebdrup/json-schema-benchmark
current validation little better than "jsck"
from gojsonschema.
There is always room for improvement and i guess it also depends a lot on the input document and schema.
from gojsonschema.
Yes, I know.
So I try to dig in and look what places can be improved and ask a for a place where I can look first. Or just do as I can.
from gojsonschema.
Then its better to use go profiling tools, it will give you real results without having to look for yourself.
from gojsonschema.
Oh, yes. I'm not profi at Go, so don't remember all tools.
Thanks for hint.
from gojsonschema.
Related Issues (20)
- Validation should fail if required key is Go Zero Value for the corresponding type
- gojsonschema.NewGoLoader() returns NOTHING
- validation mishandles anyOf
- Load schema from string HOT 1
- The validate cannot find unknow fields
- Retry on "Could not read schema from HTTP, response status is 503 Service Temporarily Unavailable" HOT 2
- Validate return err on golang 1.19 HOT 1
- A DOS vulnerability exists in parameter validity check. HOT 3
- can we create json schema from json data HOT 1
- Using Frogbot to scan this repository
- Get all properties under a section
- Wrong validation result for nested objects HOT 2
- Usage of gojsonschema in prominent open-source or large-scale projects?
- Validation errors with integers
- Error "Must be a multiple of 0.01" for Value=2000000.13
- Hostname format false positives
- Support `errorMessage` so as to customise validation errors
- major api improvement HOT 2
- invalid character '{{character}}' looking for beginning of value
- Schema validation does not return error for invalid schema definition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gojsonschema.