Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updates for Relative JSON Pointer #1400

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

Merged
gregsdennis merged 7 commits into json-schema-org:main from handrews:relptr-more-fixes
May 22, 2023

Conversation

@gregsdennis
Copy link
Member

@gregsdennis gregsdennis commented Apr 20, 2023
edited
Loading

Replaces #1361

(削除) Adds an optional index manipulation to the syntax. (削除ここまで)

It looks like this was already in the text, but the ABNF was just missing it. This PR adds the missing syntax into the ABNF.

handrews and others added 7 commits January 18, 2023 12:31
Taking the index of the result of an index manipulation was
shown in the example and intended to work, but left out of
the ABNF apparently by accident.
Also, rework the ABNF to keep it within the text RFC line width.
Somehow this was left out of the main syntax description
paragraph entirely.
The current draft allows for an index adjustment of "0" which
creates ambiguity because "1/foo", "1+0/foo", and "1-0/foo"
are now three different ways to write a pointer with the exact
same effect.
This complicates round-trips between textual and functional
representations, the original text would need to be preserved
in order to re-constitute it correctly. There is no need for
this added complication.
Copy link

@eemeli eemeli left a comment

Choose a reason for hiding this comment

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

I was asked to take a look. The ABNF looks like it matches the prose; I've left a small optimization suggestion inline.

Comment on lines +101 to +102
relative-json-pointer = origin-specification json-pointer
/ origin-specification "#"
Copy link

Choose a reason for hiding this comment

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

Suggested change
relative-json-pointer = origin-specification json-pointer
/ origin-specification "#"
relative-json-pointer = origin-specification ( "#" / json-pointer )

It might be better to not duplicate the origin-specification as it's not necessary; this equivalent formulation lets the syntax stay LL1-parseable.

gregsdennis reacted with thumbs up emoji
Copy link
Member Author

@gregsdennis gregsdennis May 18, 2023

Choose a reason for hiding this comment

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

I can't seem to push to this branch. I'll create a secondary PR for this.

Copy link
Member

@Relequestual Relequestual left a comment

Choose a reason for hiding this comment

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

Thank you for this work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Relequestual Relequestual Relequestual approved these changes

+1 more reviewer

@eemeli eemeli eemeli approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /