-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Changes from all commits
97b47f9
f833869
0fc1f30
ee1fd04
c54b3de
64e047f
c327b19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -12,7 +12,7 @@ | |||||||
<?rfc rfcedstyle="yes"?> | ||||||||
<?rfc comments="yes"?> | ||||||||
<?rfc inline="yes" ?> | ||||||||
<rfc category="info" docName="draft-bhutton-relative-json-pointer-00" ipr="trust200902" submissionType="IETF"> | ||||||||
<rfc category="info" docName="draft-handrews-relative-json-pointer-03" ipr="trust200902" submissionType="IETF"> | ||||||||
<front> | ||||||||
<title abbrev="Relative JSON Pointers">Relative JSON Pointers</title> | ||||||||
|
||||||||
|
@@ -83,35 +83,31 @@ | |||||||
<t> | ||||||||
A Relative JSON Pointer is a Unicode string in UTF-8 encoding (see RFC 8259, | ||||||||
<xref target="RFC8259">Section 8</xref>), comprising a non-negative integer, | ||||||||
followed by either a '#' (%x23) character or a JSON Pointer | ||||||||
(<xref target="RFC6901">RFC 6901</xref>). | ||||||||
an optional index adjustment consisting of '+' (%x2B) or '-' (%x2D) followed | ||||||||
by a positive integer, followed by either a '#' (%x23) character or | ||||||||
a JSON Pointer (<xref target="RFC6901">RFC 6901</xref>). | ||||||||
</t> | ||||||||
<t> | ||||||||
The separation between the integer prefix and the JSON Pointer will | ||||||||
The separation between the integer prefix (with optional adjustment) | ||||||||
and the JSON Pointer will | ||||||||
always be unambiguous, because a JSON Pointer must be either zero- | ||||||||
length or start with a '/' (%x2F). Similarly, a JSON Pointer will | ||||||||
never be ambiguous with the '#'. | ||||||||
</t> | ||||||||
<figure align="center"> | ||||||||
<preamble> | ||||||||
The ABNF syntax of a Relative JSON Pointer is: | ||||||||
</preamble> | ||||||||
<artwork> | ||||||||
<![CDATA[ | ||||||||
relative-json-pointer = non-negative-integer [index-manipulation] <json-pointer> | ||||||||
relative-json-pointer =/ non-negative-integer "#" | ||||||||
index-manipulation = ("+" / "-") non-negative-integer | ||||||||
non-negative-integer = %x30 / %x31-39 *( %x30-39 ) | ||||||||
; "0", or digits without a leading "0" | ||||||||
]]> | ||||||||
</artwork> | ||||||||
<postamble> | ||||||||
where <json-pointer> follows the production defined in | ||||||||
<xref target="RFC6901">RFC 6901, Section 3</xref> ("Syntax"). | ||||||||
</postamble> | ||||||||
</figure> | ||||||||
<t> | ||||||||
The ABNF syntax of a Relative JSON Pointer is: | ||||||||
</t> | ||||||||
<sourcecode type="abnf9110"><![CDATA[ | ||||||||
relative-json-pointer = origin-specification json-pointer | ||||||||
/ origin-specification "#" | ||||||||
Comment on lines
+101
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
It might be better to not duplicate the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||||
; json-pointer from RFC 6901 | ||||||||
|
||||||||
origin-specification = non-negative-integer [ index-manipulation ] | ||||||||
index-manipulation = ( "+" / "-" ) positive-integer | ||||||||
non-negative-integer = "0" / positive-integer | ||||||||
positive-integer = %x31-39 *DIGIT | ||||||||
; digits without a leading zero | ||||||||
]]></sourcecode> | ||||||||
</section> | ||||||||
|
||||||||
<section title="Evaluation"> | ||||||||
|
@@ -203,7 +199,7 @@ | |||||||
<artwork> | ||||||||
<![CDATA[ | ||||||||
{ | ||||||||
"foo": ["bar", "baz"], | ||||||||
"foo": ["bar", "baz", "biz"], | ||||||||
"highly": { | ||||||||
"nested": { | ||||||||
"objects": true | ||||||||
|
@@ -225,7 +221,7 @@ | |||||||
"0-1" "bar" | ||||||||
"2/highly/nested/objects" true | ||||||||
"0#" 1 | ||||||||
"0-1#" 0 | ||||||||
"0+1#" 2 | ||||||||
"1#" "foo" | ||||||||
]]> | ||||||||
</artwork> | ||||||||
|
@@ -329,6 +325,12 @@ | |||||||
</t> | ||||||||
<t> | ||||||||
<list style="hanging"> | ||||||||
<t hangText="draft-handrews-relative-json-pointer-03"> | ||||||||
<list style="symbols"> | ||||||||
<t>Fix ABNF omission for using # with index manipulation</t> | ||||||||
<t>Clarify handling of leading "0"</t> | ||||||||
</list> | ||||||||
</t> | ||||||||
<t hangText="draft-bhutton-relative-json-pointer-00"> | ||||||||
<list style="symbols"> | ||||||||
<t>Add array forward and backward index manipulation</t> | ||||||||
|
Uh oh!
There was an error while loading. Please reload this page.