Open toasted-nutbread opened 2 years ago
Using ajv poses some issues related to content security policy if not compiled: https://ajv.js.org/guide/environments.html#browsers
One place where ajv wouldn't be able to be used is profile condition validation. Profile conditions are translated to JSON schemas, which are then parsed using JsonSchema. Since ajv uses function constructors, it wouldn't be usable for this. However, falling back to the built-in JsonSchema is not really that bad, since the schemas it's validating are very small.
Schema validation of data is sub-optimal and can cause significant slowdowns for large and complex dictionary files. Some issues were brought up in this comment: https://github.com/FooSoft/yomichan/pull/2129#issuecomment-1126785466.
This issue is intended to track issues and other information related to this topic.
Related issues:
2129
2136
2137