Support multiple JSON Schema Validator Backends?
See original GitHub issueAs implicitly acknowledged in #46, validating against the JSON schema is expensive, slow, and when running things at scale, really making me think about skipping it, which is a red flag. If I’m thinking about bailing on validation, others aren’t far behind me.
I did a little digging, and it seems this is more a function of jsonschema
being slow than schema validation being inherently slow. For example, this: https://github.com/epoberezkin/ajv#performance
Couple thoughts:
- I recognize that these are not Python libraries, but it demonstrates the variability in validator performance.
- The fastest one has a command line interface that we could consider wrapping. This wouldn’t (and shouldn’t) be the default validator, but multiple backends could allow for more flexible validator support.
- There don’t actually seem to be many “native” options for JSON schema validation in Python, so wrapping one in another language might be simplest way to speed this up.
thoughts? complete heresy?
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Implementations - JSON Schema
Support for large data and streaming validation. ... Notes: can be used with YAML and many other formats besides JSON; Information last updated:...
Read more >support multiple json files · Issue #11 - GitHub
Yes. It supports multiple files; however, you cannot refer to your local file system as in JSON schema spec, the $ref is a...
Read more >The Many Amazing Uses of JSON Schema: Client-side ...
The idea is that validation rules should be written down somewhere, and not just inside the backend code. If the validation rules can...
Read more >JSON-Schema everywhere. How to make web development ...
Backend Validation in a Node.js-Middleware · Initialize AJV and load the Schemas. · Define your middleware which uses the validate-method to check the...
Read more >Guide: Setting up JSON validation - Interoperability Test Bed
An JSON validation service can be created using multiple approaches depending on your needs. You can have an on-premise (or local to your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ya, to be perfectly clear, I also don’t want to dabble in subcomponent / arbitrary
JObject
validation … but I think it might make sense to do this at theAnnotation
level rather than aJams
object, since the former tend to be more like documents, and the latter more like containers.as for profiling … I read Jams files far more than I write / modify them, so therefore the majority of my time validating Jams files is wasted (converging to “all of my time” as t -> inf). 😄
Is there any reason to keep this open, or can we close it out as a non-fixer?