You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having this "jsonpath" will aslo make it posible to indicate the row and the line the error has occurred on if you have some sort of tag database.
I am more then willing to implement this feature myself, but I require some pointers to get started.
I am looking for the functions that get called when someone starts validating a new element from an array or a tag from an object.
These functions need to be recursive so I can easily track the parents of the current tag.
Basically to use the function stack as a way to infer the parents of a tag.
An implementation detail was making this a bit difficult to do cleanly, but that should be sorted now. So, this should hit for the next release. In fact, I was just pushing out a commit with preliminary support, feel free to try it and let me know how it goes.
The error message in the current ValidationError is not helpful in identifying the invalid tag.
The validator raises error message such as these:
Error1: ["u'name' is a required property"]
We need a better way to identify such errors.
I propose we use a jsonpath-like[1] string that indicates the "path" to the invalid tag.
Ex.
x["persons"][0]["location"]["city"]
In a document like this:
Having this "jsonpath" will aslo make it posible to indicate the row and the line the error has occurred on if you have some sort of tag database.
I am more then willing to implement this feature myself, but I require some pointers to get started.
I am looking for the functions that get called when someone starts validating a new element from an array or a tag from an object.
These functions need to be recursive so I can easily track the parents of the current tag.
Basically to use the function stack as a way to infer the parents of a tag.
[1] http://goessner.net/articles/JsonPath/
The text was updated successfully, but these errors were encountered: