Open omgmashina opened 2 years ago
I can see this going either way. I believe the spec requires that the instance location to which #
is applied must actually exist, which means that you can't just get the non-manipulated index and then add an adjustment to it. Or, rather, you would have to add the adjustment and then see if the resulting location exists, which is somewhat annoying. So I lean towards supporting 0-1#
@Relequestual I think this should be fixed in the patch release? If you agree with me here it's just that something was left out of the ABNF, so this would not be adding to the set of functionality expressed by the examples. Granted, the ABNF should be normative, but I think the intent was to support this.
Per Slack conversation with @Relequestual I believe that there will not be a release of the Relative JSON Pointer spec alongside the immanent JSON Schema patch release, but I am advocating for (and volunteering to do the work for) an update of Relative JSON Pointer shortly afterwards.
It looks like this has been resolved by https://github.com/json-schema-org/json-schema-spec/pull/1400 and can be closed.
Kind of. The spec still hasn't been republished. Henry tells me there's a bit more he wants to clarify/adjust on it, but he hasn't had time.
First issue: text part of section 3. Syntax does not describe
[index-manipulation]
which is present in ABNF.Second issue: one of examples (
0-1#
) does not comply with ABNF --#
can't be used together with[index-manipulation]
.Is ABNF the ultimate truth? Should I refer to it when implementing Relative JSON Pointers? Or does ABNF require fixes? In any case, I could make a pull request with fixes, if anyone can tell me what exactly needs to be fixed.