Skip to content
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

Syntax error in JSON Pointer #29

Open
leadpony opened this issue Nov 1, 2020 · 0 comments
Open

Syntax error in JSON Pointer #29

leadpony opened this issue Nov 1, 2020 · 0 comments

Comments

@leadpony
Copy link

leadpony commented Nov 1, 2020

JSON Pointer provided by the Jakarta JSON Processing is designed to conform to RFC 6901.

RFC 6901 shows us the syntax of JSON Pointer as follows:

escaped = "~" ( "0" / "1" )

This means any tilde not followed by "0" or "1" is illegal and such case should be judged as a syntax error. Please note that tilde character is excluded from unescaped definition.

However Json#createPointer() in the Reference Implementation does not throw JsonException for the illegal input such as /~2 and treats such tilde as a normal character.

The API Javadoc of createPointer says:

JsonException - if jsonPointer is not a valid JSON Pointer

This is not a request to fix the problem. I just want to know whether this is a bug or an intended behavior.

Thank you.

@lukasj lukasj transferred this issue from jakartaee/jsonp-api Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant