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

Defines what happens when relative JSON pointer starts with zero #1147

Merged
merged 2 commits into from
Sep 6, 2022

Conversation

Relequestual
Copy link
Member

Resolves #1121

@Relequestual Relequestual linked an issue Nov 9, 2021 that may be closed by this pull request
@Relequestual Relequestual added this to the draft-patch for 2020-12 milestone Nov 9, 2021
@gregsdennis
Copy link
Member

https://tools.ietf.org/id/draft-handrews-relative-json-pointer-00.html#rfc.section.3

The spec already says that relative JSON pointers must start with positive integers.

Maybe we just remove "non-negative".

@Relequestual
Copy link
Member Author

The spec already says that relative JSON pointers must start with positive integers.

Maybe we just remove "non-negative".

It quantifies in the ABNF...

"0", or digits without a leading "0"

This is also shown in the proceeding examples...

Starting from the value "baz" (inside "foo"), the following JSON strings evaluate to the accompanying values:
"0" "baz"
...

It's essentially a no-op, but is valid.
The use is when apending # to get the key or index of the location.

(FYI latest is https://datatracker.ietf.org/doc/html/draft-bhutton-relative-json-pointer-00)

@gregsdennis
Copy link
Member

gregsdennis commented Nov 10, 2021

Then we should either change the section I linked or change the ANBF. They conflict. Personally, I'm happy with either.

(It seems "non-negative" is the current term in the latest.)

@Relequestual
Copy link
Member Author

Relequestual commented Nov 10, 2021

You do not believe zero is a non-negative integer?
We changed the language from "positive" to "non-negative" so as to include zero.

relative-json-pointer.xml Outdated Show resolved Hide resolved
@gregsdennis
Copy link
Member

My concern was alignment. I didn't care which it was. Positive and non-negative are both fine as long as the spec is consistent.

@Relequestual
Copy link
Member Author

It is consistent in the current version. You were viewing the previous 😅

Fix typo!

Co-authored-by: Ethan <133719+notEthan@users.noreply.github.com>
@Relequestual
Copy link
Member Author

As there has been little interest, I'm removing this PR and associated issue from the milestone.
It can be added back again should anyone show interest, but it shouldn't be a blocker.

@Relequestual Relequestual removed this from the draft-patch for 2020-12 milestone Nov 29, 2021
Copy link
Contributor

@handrews handrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I find the phrasing slightly awkward, everything else I can think of is also slightly awkward. This is definitely correct on a technical level, should we just go ahead and merge this?

@handrews handrews merged commit 1de426c into json-schema-org:main Sep 6, 2022
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

Successfully merging this pull request may close these issues.

Specify what happens when relative json pointer is 0
4 participants