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
I would like to be able to locate the component from a JSON instance document that is invalid according to the schema rules.
I think this can be achieved if the validation error would contain the start line and column (or offset) of the invalid component from the instance document. It would be great if it is possible to also include the end line and column in order to fully locate the component.
The text was updated successfully, but these errors were encountered:
Hello @balasaalin , the library performs the validation against JSONObject instances and not the raw JSON string. The JSONObject and JSONArray classes don't contain token information after they finish parsing the string, therefore the location of the invalid data fragment cannot be contained in the ValidationException. It has been designed this way because the JSONObject is not necessarily created by parsing a raw JSON but also can be created programmatically.
The best I can do for it is generating a JSON pointer pointing from the document root to the invalid data (see here: #6 ).
I would like to be able to locate the component from a JSON instance document that is invalid according to the schema rules.
I think this can be achieved if the validation error would contain the start line and column (or offset) of the invalid component from the instance document. It would be great if it is possible to also include the end line and column in order to fully locate the component.
The text was updated successfully, but these errors were encountered: