Skip to content

Syntax error in JSON Pointer #29

@leadpony

Description

@leadpony

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions