Comments (4)
@xaviarias I got it. It should be cached. I will get it fixed once I have time and pull request is welcome.
from json-schema-validator.
If you understand your questions correctly, you want to confirm if these ref schemas are cached in memory during processing, then the answer is yes. All the schemas are loaded before hand and cached in memory so that we can have fast validation. We have a benchmark to compare with other popular Java implementations.
https://github.com/networknt/json-schema-validator-perftest
from json-schema-validator.
Hi Steve!
My question was more regarding remote schemas. Every time RefValidator
is fetching a schema, JsonSchemaFactory
opens a new stream:
Could we think in implementing a mechanism, for instance at the JsonSchemaFactory
level, to avoid this overload? (E.g. a cache from URL -> JsonSchema)
from json-schema-validator.
@xaviarias I looked into the code and found out the access to remote is only in the constructor of RefValidator. In this case, it should only be called once during initialization. It is cached in that way like other validators. Could you please test it out to verify it? Thanks.
from json-schema-validator.
Related Issues (20)
- How to put a Validation that a number shouldn't allow more than 2 decimal points
- CollectorContext stored in ThreadLocal is causing ClassLoader leak HOT 1
- Create an empty JSON node from a JSON Schema HOT 1
- Escape single quotes in validation messages HOT 1
- Gradle compile keyword is depricated HOT 1
- Custom error message for missing field HOT 1
- [BUG] I think this is a bug about dependencies
- v1.0.87 logback vulnerability HOT 1
- Support list of Locales
- Question around `JsonSchema.getValidators()` getting marked private HOT 2
- CI failing as Logback 1.4 requires min JDK 11 but the project still retains JDK 8 compatibility
- >1.0.79: strange validation issues. HOT 1
- SchemaValidatorsConfig HOT 1
- The `MultipleOfValidator` does not support type loose configuration
- JsonSchemaFactory can potentially and silently break the application
- com.networknt.schema.JsonSchemaFactory.findMetaSchemaForSchema
- Using $ref with Relative Path HOT 7
- Using $ref with custom Path like $id of schema HOT 1
- different messages specified for different properties does not work HOT 2
- Validate array only the first elemet HOT 2
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 json-schema-validator.