-
-
Notifications
You must be signed in to change notification settings - Fork 876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easily resolve type at JSONPath #24
Comments
Not sure if I understood the question correctly. If you want traversing object using paths, you can use object-path Or you can use reactive models from milojs framework - it does much more than just that though. If you want to determine the required type for the value at a given path based on schema, it is not possible, because the schema can have 'anyOf' or 'not' keyword, for example, that would allow multiple types for a given property. Also schema can be written in such a way that the allowed type(s) for a given property would depend on other properties. If you only use simple keywords then you can answer this question, but in general case there is no definite answer. |
Hello, is there currenty a way to "find possible schemas" given a data path (or json pointer of the data) that resolves all $refs along the way (that were added into the Ajv instance)? I could not find from the docs, I suspect the answer is still no.. Thanks! |
Given a JSONPath (or similar structure) and a schema, is there a good way to determine the type ('string', 'object', etc) for a value at that path?
JSONPath
store.book[0].title
might resolve to 'string' against a schema for a book store record.Would the best approach be to just navigate the schema structure directly?
The text was updated successfully, but these errors were encountered: