Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

JSON schema validation #2138

Open
toasted-nutbread opened this issue May 17, 2022 · 2 comments
Open

JSON schema validation #2138

toasted-nutbread opened this issue May 17, 2022 · 2 comments

Comments

@toasted-nutbread
Copy link
Collaborator

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: #2129 (comment).

This issue is intended to track issues and other information related to this topic.

Related issues:

@toasted-nutbread
Copy link
Collaborator Author

Using ajv poses some issues related to content security policy if not compiled:
https://ajv.js.org/guide/environments.html#browsers

@toasted-nutbread
Copy link
Collaborator Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant