Skip to content

Commit 64e047f

Browse files
committed
Only allow non-zero index adjustmetns
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.
1 parent c54b3de commit 64e047f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

relative-json-pointer.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@
103103
; json-pointer from RFC 6901
104104
105105
origin-specification = non-negative-integer [ index-manipulation ]
106-
index-manipulation = ( "+" / "-" ) non-negative-integer
107-
non-negative-integer = "0" / %x31-39 *DIGIT
108-
; zero, or digits without a leading zero
106+
index-manipulation = ( "+" / "-" ) positive-integer
107+
non-negative-integer = "0" / positive-integer
108+
positive-integer = %x31-39 *DIGIT
109+
; digits without a leading zero
109110
]]></sourcecode>
110111
</section>
111112

0 commit comments

Comments
 (0)