json-schema-spec
json-schema-spec copied to clipboard
Defines what happens when relative JSON pointer starts with zero
Resolves #1121
https://tools.ietf.org/id/draft-handrews-relative-json-pointer-00.html#rfc.section.3
The spec already says that relative JSON pointers must start with positive integers.
Maybe we just remove "non-negative".
The spec already says that relative JSON pointers must start with positive integers.
Maybe we just remove "non-negative".
It quantifies in the ABNF...
"0", or digits without a leading "0"
This is also shown in the proceeding examples...
Starting from the value "baz" (inside "foo"), the following JSON strings evaluate to the accompanying values: "0" "baz" ...
It's essentially a no-op, but is valid.
The use is when apending #
to get the key or index of the location.
(FYI latest is https://datatracker.ietf.org/doc/html/draft-bhutton-relative-json-pointer-00)
Then we should either change the section I linked or change the ANBF. They conflict. Personally, I'm happy with either.
(It seems "non-negative" is the current term in the latest.)
You do not believe zero is a non-negative integer? We changed the language from "positive" to "non-negative" so as to include zero.
My concern was alignment. I didn't care which it was. Positive and non-negative are both fine as long as the spec is consistent.
It is consistent in the current version. You were viewing the previous 😅
As there has been little interest, I'm removing this PR and associated issue from the milestone. It can be added back again should anyone show interest, but it shouldn't be a blocker.