Skip to content

Commit a6c2dfe

Browse files
authored
Merge pull request #926 from handrews/sideways
Rel JSON Ptr forward/backward index manipulation
2 parents b615488 + 79fe5d2 commit a6c2dfe

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

relative-json-pointer.xml

+24-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</address>
3434
</author>
3535

36-
<date year="2019"/>
36+
<date year="2020"/>
3737
<workgroup>Internet Engineering Task Force</workgroup>
3838
<keyword>JSON</keyword>
3939
<keyword>JavaScript</keyword>
@@ -134,6 +134,24 @@
134134
</t>
135135
</list>
136136
</t>
137+
<t>
138+
If the next character is a plus ("+") or minus ("-"), followed by another
139+
continuous sequence of decimal digits, the following steps
140+
are taken using the decimal numeric value of that plus or minus sign
141+
and decimal sequence:
142+
<list>
143+
<t>
144+
If the current referenced value is not an item of an array,
145+
then evaluation fails (see below).
146+
</t>
147+
<t>
148+
If the referenced value is an item of an array, then the
149+
new referenced value is the item of the array indexed by
150+
adding the decimal value (which may be negative), to the
151+
index of the current referenced value.
152+
</t>
153+
</list>
154+
</t>
137155
<t>
138156
If the remainder of the Relative JSON Pointer is a JSON Pointer, then
139157
evaluation proceeds as per
@@ -300,6 +318,11 @@
300318
</t>
301319
<t>
302320
<list style="hanging">
321+
<t hangText="draft-handrews-relative-json-pointer-03">
322+
<list style="symbols">
323+
<t>Add array forward and backward index manipulation</t>
324+
</list>
325+
</t>
303326
<t hangText="draft-handrews-relative-json-pointer-02">
304327
<list style="symbols">
305328
<t>Update to the latest JSON RFC</t>

0 commit comments

Comments
 (0)