-
-
Notifications
You must be signed in to change notification settings - Fork 15
JSON Pointer reference parsing fails when pointing the root document #148
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
Comments
Indeed, thanks for the report. This bug is somewhat hidden from "real life" I think given that Out of curiosity given you're using that API, I assume you're writing a library or some thing using Thanks again. |
Thanks for the quick fix! In this case I wasn't directly using evaluate({">": [{"var": "/path_to/my_int"}, 2]}, data={"path_to": {"my_int": 1}})
#> True And I support the JSON Pointer spec to specify the location of a variable. While evaluation of such rules are not related to JSON Schema at all, I provide a typechecking mechanism, based on the JSON Schema format. I currently support a limited subset of the spec (i.e. no (might be of interest: an implementation of the json schema types). I'm currently exploring more of this with this project, and maybe in the future this could help implementing this "structured schema walker" :) |
Got it, good info, and yes that sounds great! |
While uncommon, I believe it is possible to have an empty JSON Pointer (i.e.
""
), referencing the root of the document (see examples in the RFC).Here is a regression test:
Current behavior:
The text was updated successfully, but these errors were encountered: